From 5485846b5c119a365ac3d004effc8aa97d987fce Mon Sep 17 00:00:00 2001 From: Chris R Date: Wed, 12 Jul 2017 09:56:25 -0700 Subject: [PATCH] Update IdentityModel versions to latest, fix samples. --- build/dependencies.props | 4 ++-- samples/OpenIdConnect.AzureAdSample/Startup.cs | 3 +-- samples/OpenIdConnectSample/Startup.cs | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 44605092cc..3ceeb8708b 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -2,8 +2,8 @@ 2.0.0-* 4.4.0-* - 3.13.9 - 2.1.3 + 3.14.1 + 2.1.4 2.0.1-* 10.0.1 2.0.0-* diff --git a/samples/OpenIdConnect.AzureAdSample/Startup.cs b/samples/OpenIdConnect.AzureAdSample/Startup.cs index aab6e60df8..6a6abd7c34 100644 --- a/samples/OpenIdConnect.AzureAdSample/Startup.cs +++ b/samples/OpenIdConnect.AzureAdSample/Startup.cs @@ -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() diff --git a/samples/OpenIdConnectSample/Startup.cs b/samples/OpenIdConnectSample/Startup.cs index bc5af750d3..3325ea3c3b 100644 --- a/samples/OpenIdConnectSample/Startup.cs +++ b/samples/OpenIdConnectSample/Startup.cs @@ -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; }