Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Commit 3483842

Browse files
committed
Rollback of setting Principal on AuthenticationTicket.
adjust formating of messages.
1 parent e04358f commit 3483842

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Microsoft.AspNet.Security.OpenIdConnect/OpenidConnectAuthenticationHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ protected override async Task ApplyResponseGrantAsync()
9999
string redirectUri = notification.ProtocolMessage.CreateLogoutRequestUrl();
100100
if (!Uri.IsWellFormedUriString(redirectUri, UriKind.Absolute))
101101
{
102-
_logger.WriteWarning("The logout redirect URI is malformed: " + redirectUri);
102+
_logger.WriteWarning("The logout redirect URI is malformed: {0}", (redirectUri ?? "null"));
103103
}
104104

105105
Response.Redirect(redirectUri);
@@ -195,7 +195,7 @@ protected override async Task ApplyResponseChallengeAsync()
195195
string redirectUri = notification.ProtocolMessage.CreateAuthenticationRequestUrl();
196196
if (!Uri.IsWellFormedUriString(redirectUri, UriKind.Absolute))
197197
{
198-
_logger.WriteWarning("Uri.IsWellFormedUriString(redirectUri, UriKind.Absolute) returned 'false', redirectUri is: " + (redirectUri ?? "null"));
198+
_logger.WriteWarning("Uri.IsWellFormedUriString(redirectUri, UriKind.Absolute) returned 'false', redirectUri is: {0}", (redirectUri ?? "null"));
199199
}
200200

201201
Response.Redirect(redirectUri);
@@ -343,7 +343,7 @@ protected override async Task<AuthenticationTicket> AuthenticateCoreAsync()
343343
throw new InvalidOperationException("No SecurityTokenValidator found for token: " + openIdConnectMessage.IdToken);
344344
}
345345

346-
ticket = new AuthenticationTicket(principal, properties, Options.AuthenticationType);
346+
ticket = new AuthenticationTicket(principal.Identity as ClaimsIdentity, properties);
347347
if (!string.IsNullOrWhiteSpace(openIdConnectMessage.SessionState))
348348
{
349349
ticket.Properties.Dictionary[OpenIdConnectSessionProperties.SessionState] = openIdConnectMessage.SessionState;

0 commit comments

Comments
 (0)