4 implementations of AuthenticateAsync
Microsoft.AspNetCore.Authentication.Core (1)
AuthenticationService.cs (1)
59public virtual async Task<AuthenticateResult> AuthenticateAsync(HttpContext context, string? scheme)
Microsoft.AspNetCore.Authorization.Test (3)
PolicyEvaluatorTests.cs (2)
189public Task<AuthenticateResult> AuthenticateAsync(HttpContext context, string scheme) 209public Task<AuthenticateResult> AuthenticateAsync(HttpContext context, string scheme)
TestObjects\TestAuthenticationService.cs (1)
20public Task<AuthenticateResult> AuthenticateAsync(HttpContext context, string scheme)
32 references to AuthenticateAsync
Microsoft.AspNetCore.Authentication.Abstractions (5)
AuthenticationHttpContextExtensions.cs (1)
32GetAuthenticationService(context).AuthenticateAsync(context, scheme);
AuthenticationOptions.cs (1)
69/// Used as the default scheme by <see cref="IAuthenticationService.AuthenticateAsync(HttpContext, string)"/>.
IAuthenticationSchemeProvider.cs (2)
27/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.AuthenticateAsync(HttpContext, string)"/>. 31/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.AuthenticateAsync(HttpContext, string)"/>.</returns>
TokenExtensions.cs (1)
139var result = await auth.AuthenticateAsync(context, scheme);
Microsoft.AspNetCore.Authentication.Core (2)
AuthenticationSchemeProvider.cs (2)
63/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.AuthenticateAsync(HttpContext, string)"/>. 67/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.AuthenticateAsync(HttpContext, string)"/>.</returns>
Microsoft.AspNetCore.Authentication.Test (4)
AuthenticationMiddlewareTests.cs (4)
64authenticationService.Setup(s => s.AuthenticateAsync(It.IsAny<HttpContext>(), It.IsAny<string>())) 87authenticationService.Setup(s => s.AuthenticateAsync(It.IsAny<HttpContext>(), It.IsAny<string>())) 107authenticationService.Setup(s => s.AuthenticateAsync(It.IsAny<HttpContext>(), It.IsAny<string>())) 133authenticationService.Setup(s => s.AuthenticateAsync(It.IsAny<HttpContext>(), It.IsAny<string>()))
Microsoft.AspNetCore.Authorization.Test (3)
AuthorizationMiddlewareTests.cs (3)
826authenticationService.Setup(s => s.AuthenticateAsync(It.IsAny<HttpContext>(), "Basic")) 833authenticationService.Setup(s => s.AuthenticateAsync(It.IsAny<HttpContext>(), "Bearer")) 922authenticationService.Setup(s => s.AuthenticateAsync(It.IsAny<HttpContext>(), "Bearer"))
Microsoft.AspNetCore.Identity.InMemory.Test (1)
ControllerTest.cs (1)
80auth.Setup(a => a.AuthenticateAsync(context, It.IsAny<string>())).Returns(Task.FromResult(AuthenticateResult.NoResult()));
Microsoft.AspNetCore.Identity.Test (14)
SignInManagerTest.cs (14)
216auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.TwoFactorRememberMeScheme)) 375auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.TwoFactorUserIdScheme)) 416auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.TwoFactorUserIdScheme)) 455auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.TwoFactorUserIdScheme)) 545auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.TwoFactorUserIdScheme)) 616auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.ApplicationScheme)) 700auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.TwoFactorUserIdScheme)) 735auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.TwoFactorUserIdScheme)) 792auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.TwoFactorRememberMeScheme)) 1043auth.Setup(s => s.AuthenticateAsync(context, IdentityConstants.ExternalScheme)).ReturnsAsync(authResult); 1074auth.Setup(s => s.AuthenticateAsync(context, IdentityConstants.ExternalScheme)).ReturnsAsync(authResult); 1106auth.Setup(s => s.AuthenticateAsync(context, IdentityConstants.ExternalScheme)).ReturnsAsync(authResult); 1201auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.TwoFactorUserIdScheme)) 1267auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.TwoFactorUserIdScheme))
Microsoft.AspNetCore.Mvc.Core.Test (3)
Authorization\AuthorizeFilterTest.cs (3)
612auth.Setup(c => c.AuthenticateAsync(httpContext.Object, "Bearer")).ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(bearerPrincipal, "Bearer"))); 613auth.Setup(c => c.AuthenticateAsync(httpContext.Object, "Basic")).ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(basicPrincipal, "Basic"))); 614auth.Setup(c => c.AuthenticateAsync(httpContext.Object, "Fails")).ReturnsAsync(AuthenticateResult.Fail("Fails"));