Skip to content

Commit 0da310d

Browse files
committed
Start update of API
1 parent 916e541 commit 0da310d

36 files changed

+109
-82
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,11 @@ cd "1-WebApp-OIDC\1-1-MyOrg"
160160
.AddAzureAD(options => Configuration.Bind("AzureAd", options));
161161
```
162162
163-
by this line:
163+
with these two:
164164
165165
```CSharp
166-
services.AddMicrosoftWebApp(Configuration);
166+
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
167+
.AddMicrosoftWebApp(Configuration);
167168
```
168169
169170
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public void ConfigureServices(IServiceCollection services)
3434
});
3535

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

3940
services.AddControllersWithViews(options =>
4041
{

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.1.5-preview" />
29-
<PackageReference Include="Microsoft.Identity.Web.UI" Version="0.1.5-preview" />
28+
<PackageReference Include="Microsoft.Identity.Web" Version="0.2.0-localbuild" />
29+
<PackageReference Include="Microsoft.Identity.Web.UI" Version="0.2.0-localbuild" />
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ In the `Startup.cs` file, in the `ConfigureServices` method, after `services.Add
6464
{
6565
...
6666
// Sign-in users with the Microsoft identity platform
67-
services.AddMicrosoftWebApp(Configuration, options =>
67+
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
68+
.AddMicrosoftWebApp(Configuration, options =>
6869
{
6970
Configuration.Bind("AzureAd", options);
7071
// Restrict users to specific belonging to specific tenants

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,11 @@ cd "1-WebApp-OIDC\1-2-AnyOrg"
152152
.AddAzureAD(options => Configuration.Bind("AzureAd", options));
153153
```
154154
155-
by this line:
155+
with these lines:
156156
157157
```CSharp
158-
services.AddMicrosoftWebApp(Configuration);
158+
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
159+
.AddMicrosoftWebApp(Configuration);
159160
```
160161
161162
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public void ConfigureServices(IServiceCollection services)
3434
});
3535

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

3940
services.AddControllersWithViews(options =>
4041
{

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.1.5-preview" />
22-
<PackageReference Include="Microsoft.Identity.Web.UI" Version="0.1.5-preview" />
21+
<PackageReference Include="Microsoft.Identity.Web" Version="0.2.0-localbuild" />
22+
<PackageReference Include="Microsoft.Identity.Web.UI" Version="0.2.0-localbuild" />
2323
</ItemGroup>
2424

2525
</Project>

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,13 @@ In the **appsettings.json** file:
147147
.AddAzureAD(options => Configuration.Bind("AzureAd", options));
148148
```
149149
150-
by this line:
150+
with these lines:
151151
152152
```CSharp
153-
services.AddMicrosoftWebApp(Configuration);
153+
154+
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
155+
.AddMicrosoftWebApp(Configuration);
156+
154157
```
155158
156159
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-3-AnyOrgOrPersonal/Startup.cs

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

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

3940
services.AddControllersWithViews(options =>
4041
{

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.1.5-preview" />
22-
<PackageReference Include="Microsoft.Identity.Web.UI" Version="0.1.5-preview" />
21+
<PackageReference Include="Microsoft.Identity.Web" Version="0.2.0-localbuild" />
22+
<PackageReference Include="Microsoft.Identity.Web.UI" Version="0.2.0-localbuild" />
2323
</ItemGroup>
2424

2525
</Project>

0 commit comments

Comments
 (0)