Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

interface Microsoft.​AspNetCore.​Authentication.​IAuthenticationService

Assembly: Microsoft.AspNetCore.Authentication.Abstractions

Used to provide authentication.

Methods

AuthenticateAsync​(Http.​HttpContext context, string scheme)
Authenticate for the specified authentication scheme.
Returns The result.
context The <see cref="T:Microsoft.AspNetCore.Http.HttpContext" /> .
scheme The name of the authentication scheme.
ChallengeAsync​(Http.​HttpContext context, string scheme, AuthenticationProperties? properties)
Challenge the specified authentication scheme. An authentication challenge can be issued when an unauthenticated user requests an endpoint that requires authentication.
Returns A task.
context The <see cref="T:Microsoft.AspNetCore.Http.HttpContext" /> .
scheme The name of the authentication scheme.
properties The <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationProperties" /> .
ForbidAsync​(Http.​HttpContext context, string scheme, AuthenticationProperties? properties)
Forbids the specified authentication scheme. Forbid is used when an authenticated user attempts to access a resource they are not permitted to access.
Returns A task.
context The <see cref="T:Microsoft.AspNetCore.Http.HttpContext" /> .
scheme The name of the authentication scheme.
properties The <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationProperties" /> .
SignInAsync​(Http.​HttpContext context, string scheme, System.​Security.​Claims.​ClaimsPrincipal principal, AuthenticationProperties? properties)
Sign a principal in for the specified authentication scheme.
Returns A task.
context The <see cref="T:Microsoft.AspNetCore.Http.HttpContext" /> .
scheme The name of the authentication scheme.
principal The <see cref="T:System.Security.Claims.ClaimsPrincipal" /> to sign in.
properties The <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationProperties" /> .
SignOutAsync​(Http.​HttpContext context, string scheme, AuthenticationProperties? properties)
Sign out the specified authentication scheme.
Returns A task.
context The <see cref="T:Microsoft.AspNetCore.Http.HttpContext" /> .
scheme The name of the authentication scheme.
properties The <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationProperties" /> .