Skip to content

Commit

Permalink
ensure that we always have authProperties available
Browse files Browse the repository at this point in the history
  • Loading branch information
explunit committed Mar 29, 2018
1 parent bbeca10 commit e560bc9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sustainsys.Saml2.Owin/Saml2AuthenticationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ private AuthenticationTicket CreateErrorAuthenticationTicket(HttpRequestData htt
{
authProperties = new AuthenticationProperties(
httpRequestData.StoredRequestState.RelayData);
} else
{
authProperties = new AuthenticationProperties();
}

if (httpRequestData.StoredRequestState?.ReturnUrl != null)
Expand All @@ -86,10 +89,7 @@ private AuthenticationTicket CreateErrorAuthenticationTicket(HttpRequestData htt

redirectUrl = httpRequestData.ApplicationUrl;
}
authProperties = new AuthenticationProperties
{
RedirectUri = redirectUrl.OriginalString
};
authProperties.RedirectUri = redirectUrl.OriginalString;
}

// The Google middleware adds this, so let's follow that example.
Expand Down

0 comments on commit e560bc9

Please sign in to comment.