Class CredentialsAuthenticator
Used to log in to IServices as well as ASP.NET Core, handling the synchronisation between frontend and backend authentication systems.
public sealed class CredentialsAuthenticator
- Inheritance
-
CredentialsAuthenticator
- Inherited Members
Constructors
CredentialsAuthenticator(CredentialsAuthenticationStateProvider, IServices, IClaimsPrincipalAccessor)
Used to log in to IServices as well as ASP.NET Core, handling the synchronisation between frontend and backend authentication systems.
public CredentialsAuthenticator(CredentialsAuthenticationStateProvider asp, IServices services, IClaimsPrincipalAccessor accessor)
Parameters
aspCredentialsAuthenticationStateProviderservicesIServicesaccessorIClaimsPrincipalAccessor
Properties
CanSetCookie
True if the configured authentication mechanism supports remembering the user in a cookie.
public bool CanSetCookie { get; }
Property Value
Methods
LoginAsync(Credentials, bool, CancellationToken)
Log into ASP.NET Core and IServices using user-supplied credentials.
public Task<AuthenticationResult> LoginAsync(Credentials credentials, bool setCookie, CancellationToken cancellationToken = default)
Parameters
credentialsCredentialssetCookieboolcancellationTokenCancellationToken
Returns
LogoutAsync(CancellationToken)
Log out of ASP.NET Core and IServices.
public Task<AuthenticationResult> LogoutAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken