Update IdentityModel versions to latest, fix samples.

This commit is contained in:
Chris R 2017-07-12 09:56:25 -07:00
parent 72bf2507d8
commit 5485846b5c
3 changed files with 4 additions and 5 deletions

View File

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

View File

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

View File

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