Class ClientAuthenticationManager
Manages authentication tokens, refresh tokens,
and ILoggerProviders.
Inheritance
ClientAuthenticationManager
Assembly: LemonEdge.Authentication.Client.dll
Syntax
public class ClientAuthenticationManager : IClientAuthenticationManager
Constructors
ClientAuthenticationManager(IEnumerable<ILoginProvider>, ILogger<ClientAuthenticationManager>)
Declaration
public ClientAuthenticationManager(IEnumerable<ILoginProvider> loginProviders, ILogger<ClientAuthenticationManager> logger)
Parameters
Properties
ActiveProvider
Declaration
public ILoginProvider? ActiveProvider { get; }
Property Value
LoginProviders
Declaration
public ILoginProvider[] LoginProviders { get; }
Property Value
Methods
DetermineTokenState(string, ref DateTimeOffset?)
Returns the state of the current user's access token.
This can return an AccessTokenState
or throw any of the exceptions below.
Declaration
public AccessTokenState DetermineTokenState(string token, ref DateTimeOffset? expiry)
Parameters
Returns
Exceptions
RefreshToken(DateTimeOffset?)
Attempts to refresh the current user's access token.
HttpRequestMessage. If the token
is about to expire, it silently refreshes the token.
Declaration
public Task<string> RefreshToken(DateTimeOffset? expiry)
Parameters
Returns
Exceptions
SetSelectedLoginProvider(ILoginProvider)
Declaration
public void SetSelectedLoginProvider(ILoginProvider provider)
Parameters
Implements
Extension Methods