Skip to content

Commit cd0528f

Browse files
committed
update to latest build and api
1 parent 0da310d commit cd0528f

36 files changed

+89
-90
lines changed

1-WebApp-OIDC/1-1-MyOrg/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,10 @@ cd "1-WebApp-OIDC\1-1-MyOrg"
160160
.AddAzureAD(options => Configuration.Bind("AzureAd", options));
161161
```
162162
163-
with these two:
163+
by this line:
164164
165165
```CSharp
166-
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
167-
.AddMicrosoftWebApp(Configuration);
166+
services.AddMicrosoftWebAppAuthentication(Configuration);
168167
```
169168
170169
This enables your application to use the Microsoft identity platform endpoint. This endpoint is capable of signing-in users both with their Work and School and Microsoft Personal accounts.

1-WebApp-OIDC/1-1-MyOrg/Startup.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ public void ConfigureServices(IServiceCollection services)
3434
});
3535

3636
// Sign-in users with the Microsoft identity platform
37-
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
38-
.AddMicrosoftWebApp(Configuration);
37+
services.AddMicrosoftWebAppAuthentication(Configuration);
3938

4039
services.AddControllersWithViews(options =>
4140
{

1-WebApp-OIDC/1-1-MyOrg/WebApp-OpenIDConnect-DotNet.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2626
</PackageReference>
2727
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.0.0" />
28-
<PackageReference Include="Microsoft.Identity.Web" Version="0.2.0-localbuild" />
29-
<PackageReference Include="Microsoft.Identity.Web.UI" Version="0.2.0-localbuild" />
28+
<PackageReference Include="Microsoft.Identity.Web" Version="0.2.0-preview" />
29+
<PackageReference Include="Microsoft.Identity.Web.UI" Version="0.2.0-preview" />
3030
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.0.0" />
3131
</ItemGroup>
3232

1-WebApp-OIDC/1-2-AnyOrg/README-1-1-to-1-2.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,14 @@ The actual sign-in audience (accounts to sign-in) is the lowest set of what is s
5757

5858
In order to restrict users from specific organizations from signing-in to your web app, you'll need to customize your code a bit more to restrict issuers. In Azure AD, the token issuers are the Azure AD tenants which issue tokens to applications.
5959

60-
In the `Startup.cs` file, in the `ConfigureServices` method, after `services.AddMicrosoftWebApp(Configuration)` add some code to validate specific issuers by overriding the `TokenValidationParameters.IssuerValidator` delegate.
60+
In the `Startup.cs` file, in the `ConfigureServices` method, after `services.AddMicrosoftWebAppAuthentication(Configuration)` add some code to validate specific issuers by overriding the `TokenValidationParameters.IssuerValidator` delegate.
6161

6262
```CSharp
6363
public void ConfigureServices(IServiceCollection services)
6464
{
6565
...
6666
// Sign-in users with the Microsoft identity platform
67-
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
68-
.AddMicrosoftWebApp(Configuration, options =>
67+
services.AddMicrosoftWebAppAuthentication(Configuration, options =>
6968
{
7069
Configuration.Bind("AzureAd", options);
7170
// Restrict users to specific belonging to specific tenants

1-WebApp-OIDC/1-2-AnyOrg/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,10 @@ cd "1-WebApp-OIDC\1-2-AnyOrg"
152152
.AddAzureAD(options => Configuration.Bind("AzureAd", options));
153153
```
154154
155-
with these lines:
155+
by this line:
156156
157157
```CSharp
158-
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
159-
.AddMicrosoftWebApp(Configuration);
158+
services.AddMicrosoftWebAppAuthentication(Configuration);
160159
```
161160
162161
This enables your application to use the Microsoft identity platform endpoint. This endpoint is capable of signing-in users both with their Work and School and Microsoft Personal accounts.

1-WebApp-OIDC/1-2-AnyOrg/Startup.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ public void ConfigureServices(IServiceCollection services)
3434
});
3535

3636
// Sign-in users with the Microsoft identity platform
37-
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
38-
.AddMicrosoftWebApp(Configuration);
37+
services.AddMicrosoftWebAppAuthentication(Configuration);
3938

4039
services.AddControllersWithViews(options =>
4140
{

1-WebApp-OIDC/1-2-AnyOrg/WebApp-OpenIDConnect-DotNet.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
</ItemGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="Microsoft.Identity.Web" Version="0.2.0-localbuild" />
22-
<PackageReference Include="Microsoft.Identity.Web.UI" Version="0.2.0-localbuild" />
21+
<PackageReference Include="Microsoft.Identity.Web" Version="0.2.0-preview" />
22+
<PackageReference Include="Microsoft.Identity.Web.UI" Version="0.2.0-preview" />
2323
</ItemGroup>
2424

2525
</Project>

1-WebApp-OIDC/1-3-AnyOrgOrPersonal/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,11 @@ In the **appsettings.json** file:
147147
.AddAzureAD(options => Configuration.Bind("AzureAd", options));
148148
```
149149
150-
with these lines:
150+
by this line:
151151
152152
```CSharp
153153
154-
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
155-
.AddMicrosoftWebApp(Configuration);
154+
services.AddMicrosoftWebAppAuthentication(Configuration);
156155
157156
```
158157

1-WebApp-OIDC/1-3-AnyOrgOrPersonal/Startup.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ public void ConfigureServices(IServiceCollection services)
3434
});
3535

3636
// Sign-in users with the Microsoft identity platform
37-
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
38-
.AddMicrosoftWebApp(Configuration);
37+
services.AddMicrosoftWebAppAuthentication(Configuration);
3938

4039
services.AddControllersWithViews(options =>
4140
{

1-WebApp-OIDC/1-3-AnyOrgOrPersonal/WebApp-OpenIDConnect-DotNet.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
</ItemGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="Microsoft.Identity.Web" Version="0.2.0-localbuild" />
22-
<PackageReference Include="Microsoft.Identity.Web.UI" Version="0.2.0-localbuild" />
21+
<PackageReference Include="Microsoft.Identity.Web" Version="0.2.0-preview" />
22+
<PackageReference Include="Microsoft.Identity.Web.UI" Version="0.2.0-preview" />
2323
</ItemGroup>
2424

2525
</Project>

0 commit comments

Comments
 (0)