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

Commit 107085c

Browse files
committed
Add NotNull
1 parent 74d50d0 commit 107085c

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
using System.Security.Claims;
66
using System.Threading.Tasks;
77
using Microsoft.AspNet.Http.Features.Authentication;
8+
using Microsoft.Framework.Internal;
89

910
namespace Microsoft.AspNet.Http.Authentication
1011
{
1112
public abstract class AuthenticationManager
1213
{
1314
public abstract IEnumerable<AuthenticationDescription> GetAuthenticationSchemes();
1415

15-
public abstract Task AuthenticateAsync(AuthenticateContext context);
16+
public abstract Task AuthenticateAsync([NotNull] AuthenticateContext context);
1617

17-
public async Task<ClaimsPrincipal> AuthenticateAsync(string authenticationScheme)
18+
public async Task<ClaimsPrincipal> AuthenticateAsync([NotNull] string authenticationScheme)
1819
{
1920
var context = new AuthenticateContext(authenticationScheme);
2021
await AuthenticateAsync(context);
@@ -31,47 +32,47 @@ public virtual Task ChallengeAsync(AuthenticationProperties properties)
3132
return ChallengeAsync(authenticationScheme: null, properties: properties);
3233
}
3334

34-
public virtual Task ChallengeAsync(string authenticationScheme)
35+
public virtual Task ChallengeAsync([NotNull] string authenticationScheme)
3536
{
3637
return ChallengeAsync(authenticationScheme: authenticationScheme, properties: null);
3738
}
3839

3940
// Leave it up to authentication handler to do the right thing for the challenge
40-
public Task ChallengeAsync(string authenticationScheme, AuthenticationProperties properties)
41+
public Task ChallengeAsync([NotNull] string authenticationScheme, AuthenticationProperties properties)
4142
{
4243
return ChallengeAsync(authenticationScheme, properties, ChallengeBehavior.Automatic);
4344
}
4445

45-
public Task SignInAsync(string authenticationScheme, ClaimsPrincipal principal)
46+
public Task SignInAsync([NotNull] string authenticationScheme, ClaimsPrincipal principal)
4647
{
4748
return SignInAsync(authenticationScheme, principal, properties: null);
4849
}
4950

50-
public Task ForbidAsync(string authenticationScheme)
51+
public Task ForbidAsync([NotNull] string authenticationScheme)
5152
{
5253
return ForbidAsync(authenticationScheme, properties: null);
5354
}
5455

5556
// Deny access (typically a 403)
56-
public Task ForbidAsync(string authenticationScheme, AuthenticationProperties properties)
57+
public Task ForbidAsync([NotNull] string authenticationScheme, AuthenticationProperties properties)
5758
{
5859
return ChallengeAsync(authenticationScheme, properties, ChallengeBehavior.Forbidden);
5960
}
6061

61-
public abstract Task ChallengeAsync(string authenticationScheme, AuthenticationProperties properties, ChallengeBehavior behavior);
62+
public abstract Task ChallengeAsync([NotNull] string authenticationScheme, AuthenticationProperties properties, ChallengeBehavior behavior);
6263

63-
public abstract Task SignInAsync(string authenticationScheme, ClaimsPrincipal principal, AuthenticationProperties properties);
64+
public abstract Task SignInAsync([NotNull] string authenticationScheme, ClaimsPrincipal principal, AuthenticationProperties properties);
6465

6566
public Task SignOutAsync()
6667
{
6768
return SignOutAsync(authenticationScheme: null, properties: null);
6869
}
6970

70-
public Task SignOutAsync(string authenticationScheme)
71+
public Task SignOutAsync([NotNull] string authenticationScheme)
7172
{
7273
return SignOutAsync(authenticationScheme, properties: null);
7374
}
7475

75-
public abstract Task SignOutAsync(string authenticationScheme, AuthenticationProperties properties);
76+
public abstract Task SignOutAsync([NotNull] string authenticationScheme, AuthenticationProperties properties);
7677
}
7778
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public override async Task SignInAsync([NotNull] string authenticationScheme, [N
9696
}
9797
}
9898

99-
public override async Task SignOutAsync(string authenticationScheme, AuthenticationProperties properties)
99+
public override async Task SignOutAsync([NotNull] string authenticationScheme, AuthenticationProperties properties)
100100
{
101101
var handler = HttpAuthenticationFeature.Handler;
102102

0 commit comments

Comments
 (0)