From 5accaa25403ca372d50591b1691c7d6d47e8340e Mon Sep 17 00:00:00 2001 From: Desislav Date: Mon, 26 Jan 2015 11:29:52 +0200 Subject: [PATCH] Fixing the Options.ConfigurationManager initialization inside the OpeIdConnectAuthenticationMiddleWare constructor. --- samples/CookieSample/CookieSample.kproj | 5 +++-- samples/CookieSessionSample/CookieSessionSample.kproj | 5 +++-- samples/SocialSample/SocialSample.kproj | 5 +++-- .../OpenIdConnectAuthenticationMiddleware.cs | 5 ++--- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/samples/CookieSample/CookieSample.kproj b/samples/CookieSample/CookieSample.kproj index 0cc892155..98e37f514 100644 --- a/samples/CookieSample/CookieSample.kproj +++ b/samples/CookieSample/CookieSample.kproj @@ -1,4 +1,4 @@ - + 14.0 @@ -12,6 +12,7 @@ 2.0 + 3032 - + \ No newline at end of file diff --git a/samples/CookieSessionSample/CookieSessionSample.kproj b/samples/CookieSessionSample/CookieSessionSample.kproj index 3dde446f7..df5aa3177 100644 --- a/samples/CookieSessionSample/CookieSessionSample.kproj +++ b/samples/CookieSessionSample/CookieSessionSample.kproj @@ -1,4 +1,4 @@ - + 14.0 @@ -12,6 +12,7 @@ 2.0 + 3035 - + \ No newline at end of file diff --git a/samples/SocialSample/SocialSample.kproj b/samples/SocialSample/SocialSample.kproj index 640b2404b..da925cf28 100644 --- a/samples/SocialSample/SocialSample.kproj +++ b/samples/SocialSample/SocialSample.kproj @@ -1,4 +1,4 @@ - + 14.0 @@ -12,6 +12,7 @@ 2.0 + 3033 - + \ No newline at end of file diff --git a/src/Microsoft.AspNet.Security.OpenIdConnect/OpenIdConnectAuthenticationMiddleware.cs b/src/Microsoft.AspNet.Security.OpenIdConnect/OpenIdConnectAuthenticationMiddleware.cs index bbe59f50d..68817b737 100644 --- a/src/Microsoft.AspNet.Security.OpenIdConnect/OpenIdConnectAuthenticationMiddleware.cs +++ b/src/Microsoft.AspNet.Security.OpenIdConnect/OpenIdConnectAuthenticationMiddleware.cs @@ -105,16 +105,15 @@ public OpenIdConnectAuthenticationMiddleware( { Options.ConfigurationManager = new StaticConfigurationManager(Options.Configuration); } - else if (!(string.IsNullOrWhiteSpace(Options.MetadataAddress) && string.IsNullOrWhiteSpace(Options.Authority))) + else if (!(string.IsNullOrWhiteSpace(Options.MetadataAddress) || !(string.IsNullOrWhiteSpace(Options.Authority)))) { - if (string.IsNullOrWhiteSpace(Options.MetadataAddress) && !string.IsNullOrWhiteSpace(Options.Authority)) + if (string.IsNullOrWhiteSpace(Options.MetadataAddress)) { Options.MetadataAddress = Options.Authority; if (!Options.MetadataAddress.EndsWith("/", StringComparison.Ordinal)) { Options.MetadataAddress += "/"; } - Options.MetadataAddress += ".well-known/openid-configuration"; }