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

Commit 43a38c1

Browse files
committed
Reorder Challenge parameters.
1 parent 06e24a8 commit 43a38c1

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/Microsoft.AspNet.Http.Core/Authentication/AuthenticationManager.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,27 @@ public abstract class AuthenticationManager
1717

1818
public virtual void Challenge()
1919
{
20-
Challenge(properties: null, authenticationScheme: null);
20+
Challenge(authenticationScheme: null, properties: null);
2121
}
2222

2323
public virtual void Challenge(AuthenticationProperties properties)
2424
{
25-
Challenge(properties, "");
25+
Challenge(authenticationScheme: null, properties: properties);
2626
}
2727

2828
public virtual void Challenge(string authenticationScheme)
2929
{
30-
Challenge(properties: null, authenticationScheme: authenticationScheme);
30+
Challenge(authenticationScheme: authenticationScheme, properties: null);
3131
}
3232

33-
public abstract void Challenge(AuthenticationProperties properties, string authenticationScheme);
33+
public abstract void Challenge(string authenticationScheme, AuthenticationProperties properties);
3434

35-
public abstract void SignIn(string authenticationScheme, ClaimsPrincipal principal, AuthenticationProperties properties = null);
35+
public void SignIn(string authenticationScheme, ClaimsPrincipal principal)
36+
{
37+
SignIn(authenticationScheme, principal, properties: null);
38+
}
39+
40+
public abstract void SignIn(string authenticationScheme, ClaimsPrincipal principal, AuthenticationProperties properties);
3641

3742
public virtual void SignOut()
3843
{

src/Microsoft.AspNet.Http/Authentication/DefaultAuthenticationManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public override async Task<AuthenticationResult> AuthenticateAsync([NotNull] str
9797
new AuthenticationDescription(authenticateContext.Description));
9898
}
9999

100-
public override void Challenge(AuthenticationProperties properties, string authenticationScheme)
100+
public override void Challenge(string authenticationScheme, AuthenticationProperties properties)
101101
{
102102
HttpResponseFeature.StatusCode = 401;
103103
var handler = HttpAuthenticationFeature.Handler;

0 commit comments

Comments
 (0)