Table of Contents

Class CredentialsAuthenticator

Namespace
The.Web.Security
Assembly
Instagile.Web.Client.dll

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

asp CredentialsAuthenticationStateProvider
services IServices
accessor IClaimsPrincipalAccessor

Properties

CanSetCookie

True if the configured authentication mechanism supports remembering the user in a cookie.

public bool CanSetCookie { get; }

Property Value

bool

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

credentials Credentials
setCookie bool
cancellationToken CancellationToken

Returns

Task<AuthenticationResult>

LogoutAsync(CancellationToken)

Log out of ASP.NET Core and IServices.

public Task<AuthenticationResult> LogoutAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<AuthenticationResult>