Dela via


Microsoft.AspNetCore.Authentication Namespace

Contains types that enable support for authentication. IAuthenticationService is the main entry point which defines the 5 authentication actions: Authenticate (get any authentication data for a request), Challenge (used for unauthenticated requests), Forbid (used when an authenticated request should be denied), SignIn (associate a ClaimsPrincipal), SignOut (remove any associated data). At a high level, authentication is based around the concept of schemes, which are mapped to specific IAuthenticationHandler instances which are responsible for handling each of the authentication actions.

Classes

AccessDeniedContext

Provides access denied failure context information to handler providers.

AuthenticateResult

Contains the result of an Authenticate call

AuthenticationBuilder

Used to configure authentication

AuthenticationBuilderExtensions

Extension methods to configure authentication for existing APIs coexisting with an Authorization Server.

AuthenticationConfigurationProviderExtensions

Extension methods for IAuthenticationConfigurationProvider

AuthenticationFailureException

A generic authentication failure.

AuthenticationFeature

Used to capture path info so redirects can be computed properly within an app.Map().

AuthenticationHandler<TOptions>

An opinionated abstraction for implementing IAuthenticationHandler.

AuthenticationHandlerProvider

Implementation of IAuthenticationHandlerProvider.

AuthenticationHttpContextExtensions

Extension methods to expose Authentication on HttpContext.

AuthenticationMiddleware

Middleware that performs authentication.

AuthenticationMiddleware<TOptions>
AuthenticationOptions

Options to configure authentication.

AuthenticationProperties

Dictionary used to store state values about the authentication session.

AuthenticationScheme

AuthenticationSchemes assign a name to a specific IAuthenticationHandler handlerType.

AuthenticationSchemeBuilder

Used to build AuthenticationSchemes.

AuthenticationSchemeOptions

Contains the options used by the AuthenticationHandler<TOptions>.

AuthenticationSchemeProvider

Implements IAuthenticationSchemeProvider.

AuthenticationService

Implements IAuthenticationService.

AuthenticationTicket

Contains user identity information as well as additional authentication state.

AuthenticationToken

Name/Value representing a token.

AuthenticationTokenExtensions

Extension methods for storing authentication tokens in AuthenticationProperties.

AzureADAuthenticationBuilderExtensions

Extension methods to add Azure Active Directory Authentication to your application.

AzureADB2CAuthenticationBuilderExtensions

Extension methods to add Azure Active Directory B2C Authentication to your application.

Base64UrlTextEncoder

Allows encoding and decoding base-64 url encoded text.

BaseContext
BaseContext<TOptions>

Base class used by other context classes.

BaseControlContext
ClaimActionCollectionMapExtensions

Extension methods for ClaimActionCollection.

ClaimActionCollectionUniqueExtensions

Extension methods for ClaimActionCollection.

ClaimsTransformationContext
ClaimsTransformationHandler

Handler that applies ClaimsTransformation to authentication

ClaimsTransformationMiddleware
ClaimsTransformer
FailureContext

Provides failure context information to middleware providers.

HandleRequestContext<TOptions>

Base context type for handling authentication request.

HandleRequestResult

Contains the result of an Authenticate call

JsonDocumentAuthExtensions

Authentication extensions to JsonDocument.

NoopClaimsTransformation

Default claims transformation is a no-op.

PolicySchemeHandler

PolicySchemes are used to redirect authentication methods to another scheme.

PolicySchemeOptions

Contains the options used by the PolicySchemeHandler.

PrincipalContext<TOptions>

Base context for authentication events which deal with a ClaimsPrincipal.

PropertiesContext<TOptions>

Base context for authentication events which contain AuthenticationProperties.

PropertiesDataFormat

A SecureDataFormat<TData> instance to secure AuthenticationProperties.

PropertiesSerializer

A IDataSerializer<TModel> for AuthenticationProperties.

RedirectContext<TOptions>

Context passed for redirect events.

RemoteAuthenticationContext<TOptions>

Base context for remote authentication.

RemoteAuthenticationEvents

Allows subscribing to events raised during remote authentication.

RemoteAuthenticationHandler<TOptions>

An opinionated abstraction for an AuthenticationHandler<TOptions> that performs authentication using a separately hosted provider.

RemoteAuthenticationOptions

Contains the options used by the RemoteAuthenticationHandler<TOptions>.

RemoteFailureContext

Provides failure context information to handler providers.

RequestPathBaseCookieBuilder

A cookie builder that sets Path to the request path base.

ResultContext<TOptions>

Base context for events that produce AuthenticateResults.

SecureDataFormat<TData>

An implementation for ISecureDataFormat<TData>.

SharedAuthenticationOptions
SignInAuthenticationHandler<TOptions>

Adds support for SignInAsync

SignOutAuthenticationHandler<TOptions>

Adds support for SignOutAsync

SystemClock

Provides access to the normal system clock with precision in seconds.

TicketDataFormat

A SecureDataFormat<TData> instance to secure AuthenticationTicket.

TicketReceivedContext

Provides context information to handler providers.

TicketSerializer

Serializes and deserializes AuthenticationTicket instances.

Interfaces

IAuthenticateResultFeature

Used to capture the AuthenticateResult from the authorization middleware.

IAuthenticationConfigurationProvider

Provides an interface for implmenting a construct that provides access to authentication-related configuration sections.

IAuthenticationFeature

Used to capture path info so redirects can be computed properly within an app.Map().

IAuthenticationHandler

Created per request to handle authentication for a particular scheme.

IAuthenticationHandlerProvider

Provides the appropriate IAuthenticationHandler instance for the authenticationScheme and request.

IAuthenticationRequestHandler

Used to determine if a handler wants to participate in request processing.

IAuthenticationSchemeProvider

Responsible for managing what authenticationSchemes are supported.

IAuthenticationService

Used to provide authentication.

IAuthenticationSignInHandler

Used to determine if a handler supports SignIn.

IAuthenticationSignOutHandler

Used to determine if a handler supports SignOut.

IClaimsTransformation

Used by the IAuthenticationService for claims transformation.

IClaimsTransformer

Used for claims transformation.

IDataSerializer<TModel>

Contract for serialzing authentication data.

IRemoteAuthenticationEvents
ISecureDataFormat<TData>

A contract for securing data.

ISystemClock

Abstracts the system clock to facilitate testing.

Enums

EventResultState

Remarks

For more information about authentication, see Introduction to authentication in ASP.NET Core.