Class AuthenticationHandlerFeature
- Namespace
- Cuemon.AspNetCore.Authentication
- Assembly
- Cuemon.AspNetCore.Authentication.dll
Provides a combined default implementation of IAuthenticateResultFeature and IHttpAuthenticationFeature so that AuthenticateResult and User is consistent with each other.
public class AuthenticationHandlerFeature : IAuthenticateResultFeature, IHttpAuthenticationFeature
- Inheritance
-
AuthenticationHandlerFeature
- Implements
Remarks
Inspiration/cloned from https://github.com/dotnet/aspnetcore/blob/main/src/Security/Authentication/Core/src/AuthenticationFeatures.cs
Constructors
AuthenticationHandlerFeature(AuthenticateResult)
Initializes a new instance of the AuthenticationHandlerFeature class.
public AuthenticationHandlerFeature(AuthenticateResult result)
Parameters
result
AuthenticateResultThe AuthenticateResult to propagate.
Properties
AuthenticateResult
The AuthenticateResult from the authorization middleware.
public AuthenticateResult AuthenticateResult { get; set; }
Property Value
- AuthenticateResult
The AuthenticateResult to propagate.
User
Gets or sets the ClaimsPrincipal associated with the HTTP request.
public ClaimsPrincipal User { get; set; }
Property Value
- ClaimsPrincipal
The ClaimsPrincipal associated with the HTTP request.
Methods
Set(AuthenticateResult, HttpContext)
Provides a convenient and consistent way of propagating HTTP features for IAuthenticateResultFeature and IHttpAuthenticationFeature.
public static void Set(AuthenticateResult result, HttpContext context)
Parameters
result
AuthenticateResultThe AuthenticateResult to propagate.
context
HttpContextThe HttpContext to use as propagation channel.