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

Commit

Permalink
Reorder Challenge parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tratcher committed Apr 24, 2015
1 parent 06e24a8 commit 43a38c1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,27 @@ public abstract class AuthenticationManager

public virtual void Challenge()
{
Challenge(properties: null, authenticationScheme: null);
Challenge(authenticationScheme: null, properties: null);
}

public virtual void Challenge(AuthenticationProperties properties)
{
Challenge(properties, "");
Challenge(authenticationScheme: null, properties: properties);
}

public virtual void Challenge(string authenticationScheme)
{
Challenge(properties: null, authenticationScheme: authenticationScheme);
Challenge(authenticationScheme: authenticationScheme, properties: null);
}

public abstract void Challenge(AuthenticationProperties properties, string authenticationScheme);
public abstract void Challenge(string authenticationScheme, AuthenticationProperties properties);

public abstract void SignIn(string authenticationScheme, ClaimsPrincipal principal, AuthenticationProperties properties = null);
public void SignIn(string authenticationScheme, ClaimsPrincipal principal)
{
SignIn(authenticationScheme, principal, properties: null);
}

public abstract void SignIn(string authenticationScheme, ClaimsPrincipal principal, AuthenticationProperties properties);

public virtual void SignOut()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public override async Task<AuthenticationResult> AuthenticateAsync([NotNull] str
new AuthenticationDescription(authenticateContext.Description));
}

public override void Challenge(AuthenticationProperties properties, string authenticationScheme)
public override void Challenge(string authenticationScheme, AuthenticationProperties properties)
{
HttpResponseFeature.StatusCode = 401;
var handler = HttpAuthenticationFeature.Handler;
Expand Down

0 comments on commit 43a38c1

Please sign in to comment.