Table of Contents

Class AuthenticationHandlerFeature

Namespace
Cuemon.AspNetCore.Authentication
Assembly
Cuemon.AspNetCore.Authentication.dll

Provides a combined default implementation of Microsoft.AspNetCore.Authentication.IAuthenticateResultFeature and Microsoft.AspNetCore.Http.Features.Authentication.IHttpAuthenticationFeature so that AuthenticateResult and User is consistent with each other.

public class AuthenticationHandlerFeature : IAuthenticateResultFeature, IHttpAuthenticationFeature
Inheritance
Object
AuthenticationHandlerFeature
Implements
IAuthenticateResultFeature
IHttpAuthenticationFeature

Remarks

Constructors

AuthenticationHandlerFeature(AuthenticateResult)

Initializes a new instance of the AuthenticationHandlerFeature class.

public AuthenticationHandlerFeature(AuthenticateResult result)

Parameters

result AuthenticateResult

The Microsoft.AspNetCore.Authentication.AuthenticateResult to propagate.

Properties

AuthenticateResult

The Microsoft.AspNetCore.Authentication.IAuthenticateResultFeature.AuthenticateResult from the authorization middleware.

public AuthenticateResult AuthenticateResult { get; set; }

Property Value

AuthenticateResult

The Microsoft.AspNetCore.Authentication.AuthenticateResult to propagate.

User

Gets or sets the System.Security.Claims.ClaimsPrincipal associated with the HTTP request.

public ClaimsPrincipal User { get; set; }

Property Value

ClaimsPrincipal

The System.Security.Claims.ClaimsPrincipal associated with the HTTP request.

Methods

Set(AuthenticateResult, HttpContext)

Provides a convenient and consistent way of propagating HTTP features for Microsoft.AspNetCore.Authentication.IAuthenticateResultFeature and Microsoft.AspNetCore.Http.Features.Authentication.IHttpAuthenticationFeature.

public static void Set(AuthenticateResult result, HttpContext context)

Parameters

result AuthenticateResult

The Microsoft.AspNetCore.Authentication.AuthenticateResult to propagate.

context HttpContext

The Microsoft.AspNetCore.Http.HttpContext to use as propagation channel.

See Also

IAuthenticateResultFeature
IHttpAuthenticationFeature