Skip to content

Commit c596200

Browse files
authored
Merge pull request #371 from Azure-Samples/updateApi
API updates for 0.2.0-preview
2 parents be450af + 3a45878 commit c596200

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+233
-234
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ cd "1-WebApp-OIDC\1-1-MyOrg"
163163
by this line:
164164
165165
```CSharp
166-
services.AddSignIn(Configuration);
166+
services.AddMicrosoftWebAppAuthentication(Configuration);
167167
```
168168
169169
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void ConfigureServices(IServiceCollection services)
3434
});
3535

3636
// Sign-in users with the Microsoft identity platform
37-
services.AddSignIn(Configuration);
37+
services.AddMicrosoftWebAppAuthentication(Configuration);
3838

3939
services.AddControllersWithViews(options =>
4040
{

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-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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +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.AddSignIn(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.AddSignIn(Configuration, options =>
67+
services.AddMicrosoftWebAppAuthentication(Configuration, options =>
6868
{
6969
Configuration.Bind("AzureAd", options);
7070
// Restrict users to specific belonging to specific tenants

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ cd "1-WebApp-OIDC\1-2-AnyOrg"
155155
by this line:
156156
157157
```CSharp
158-
services.AddSignIn(Configuration);
158+
services.AddMicrosoftWebAppAuthentication(Configuration);
159159
```
160160
161161
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.
@@ -221,14 +221,14 @@ These steps are encapsulated in the [Microsoft.Identity.Web](..\..\Microsoft.Ide
221221
222222
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.
223223

224-
In the `Startup.cs` file, in the `ConfigureServices` method, after `services.AddMicrosoftIdentityPlatformAuthentication(Configuration)` add some code to filter issuers by overriding the `TokenValidationParameters.IssuerValidator` delegate.
224+
In the `Startup.cs` file, in the `ConfigureServices` method, after `services.AddMicrosoftWebAppAuthentication(Configuration)` add some code to filter issuers by overriding the `TokenValidationParameters.IssuerValidator` delegate.
225225

226226
```CSharp
227227
public void ConfigureServices(IServiceCollection services)
228228
{
229229
...
230230
// Sign-in users with the Microsoft identity platform
231-
services.AddSignIn(Configuration);
231+
services.AddMicrosoftWebAppAuthentication(Configuration);
232232
233233
// Restrict users to specific belonging to specific tenants
234234
services.Configure<OpenIdConnectOptions>(OpenIdConnectDefaults.AuthenticationScheme, options =>

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

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

3636
// Sign-in users with the Microsoft identity platform
37-
services.AddSignIn(Configuration);
37+
services.AddMicrosoftWebAppAuthentication(Configuration);
3838

3939
services.AddControllersWithViews(options =>
4040
{

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-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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ In the **appsettings.json** file:
150150
by this line:
151151
152152
```CSharp
153-
services.AddSignIn(Configuration);
153+
154+
services.AddMicrosoftWebAppAuthentication(Configuration);
155+
154156
```
155157
156158
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void ConfigureServices(IServiceCollection services)
3434
});
3535

3636
// Sign-in users with the Microsoft identity platform
37-
services.AddSignIn(Configuration);
37+
services.AddMicrosoftWebAppAuthentication(Configuration);
3838

3939
services.AddControllersWithViews(options =>
4040
{

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

2525
</Project>

0 commit comments

Comments
 (0)