Merge branch 'rel/2.0.0' into dev

This commit is contained in:
Chris R 2017-07-12 10:37:05 -07:00
commit 631b24520b
3 changed files with 4 additions and 5 deletions

View File

@ -2,8 +2,8 @@
<PropertyGroup> <PropertyGroup>
<AspNetCoreVersion>2.0.0-*</AspNetCoreVersion> <AspNetCoreVersion>2.0.0-*</AspNetCoreVersion>
<CoreFxVersion>4.4.0-*</CoreFxVersion> <CoreFxVersion>4.4.0-*</CoreFxVersion>
<IdentityModelActiveDirectoryVersion>3.13.9</IdentityModelActiveDirectoryVersion> <IdentityModelActiveDirectoryVersion>3.14.1</IdentityModelActiveDirectoryVersion>
<IdentityModelOpenIdVersion>2.1.3</IdentityModelOpenIdVersion> <IdentityModelOpenIdVersion>2.1.4</IdentityModelOpenIdVersion>
<InternalAspNetCoreSdkVersion>2.0.1-*</InternalAspNetCoreSdkVersion> <InternalAspNetCoreSdkVersion>2.0.1-*</InternalAspNetCoreSdkVersion>
<JsonNetVersion>10.0.1</JsonNetVersion> <JsonNetVersion>10.0.1</JsonNetVersion>
<NETStandardImplicitPackageVersion>2.0.0-*</NETStandardImplicitPackageVersion> <NETStandardImplicitPackageVersion>2.0.0-*</NETStandardImplicitPackageVersion>

View File

@ -45,8 +45,7 @@ namespace OpenIdConnect.AzureAdSample
{ {
services.AddAuthentication(sharedOptions => services.AddAuthentication(sharedOptions =>
{ {
sharedOptions.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme; sharedOptions.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
sharedOptions.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
sharedOptions.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme; sharedOptions.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
}) })
.AddCookie() .AddCookie()

View File

@ -147,7 +147,7 @@ namespace OpenIdConnectSample
// Authenticated, but not authorized // Authenticated, but not authorized
if (context.Request.Path.Equals("/restricted") && !user.Identities.Any(identity => identity.HasClaim("special", "true"))) if (context.Request.Path.Equals("/restricted") && !user.Identities.Any(identity => identity.HasClaim("special", "true")))
{ {
await context.ChallengeAsync(); await context.ForbidAsync();
return; return;
} }