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

Commit

Permalink
Creating authentication ticket by passing in a principal
Browse files Browse the repository at this point in the history
This fixes bug : #144
  • Loading branch information
Praburaj committed Feb 2, 2015
1 parent a249cbb commit 4e83a67
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ protected override async Task<AuthenticationTicket> AuthenticateCoreAsync()
// assumption: if the ContentType is "application/x-www-form-urlencoded" it should be safe to read as it is small.
if (string.Equals(Request.Method, "POST", StringComparison.OrdinalIgnoreCase)
&& !string.IsNullOrWhiteSpace(Request.ContentType)
// May have media/type; charset=utf-8, allow partial match.
// May have media/type; charset=utf-8, allow partial match.
&& Request.ContentType.StartsWith("application/x-www-form-urlencoded", StringComparison.OrdinalIgnoreCase)
&& Request.Body.CanRead)
{
Expand Down Expand Up @@ -343,7 +343,7 @@ protected override async Task<AuthenticationTicket> AuthenticateCoreAsync()
throw new InvalidOperationException("No SecurityTokenValidator found for token: " + openIdConnectMessage.IdToken);
}

ticket = new AuthenticationTicket(principal.Identity as ClaimsIdentity, properties);
ticket = new AuthenticationTicket(principal, properties, Options.AuthenticationType);
if (!string.IsNullOrWhiteSpace(openIdConnectMessage.SessionState))
{
ticket.Properties.Dictionary[OpenIdConnectSessionProperties.SessionState] = openIdConnectMessage.SessionState;
Expand Down

0 comments on commit 4e83a67

Please sign in to comment.