Search Results for

    Show / Hide Table of Contents

    Class ClientAuthenticationManager

    Manages authentication tokens, refresh tokens, and ILoggerProviders.

    Inheritance
    object
    ClientAuthenticationManager
    Implements
    IClientAuthenticationManager
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Authentication.Client
    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
    Type Name Description
    IEnumerable<ILoginProvider> loginProviders
    ILogger<ClientAuthenticationManager> logger

    Properties

    ActiveProvider

    Gets the active / chosen ILoginProvider.

    Declaration
    public ILoginProvider? ActiveProvider { get; }
    Property Value
    Type Description
    ILoginProvider

    LoginProviders

    Gets the list of available ILoginProviders.

    Declaration
    public ILoginProvider[] LoginProviders { get; }
    Property Value
    Type Description
    ILoginProvider[]

    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
    Type Name Description
    string token
    DateTimeOffset? expiry
    Returns
    Type Description
    AccessTokenState

    An AccessTokenState

    Exceptions
    Type Condition
    ArgumentException

    A token parsing error

    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
    Type Name Description
    DateTimeOffset? expiry
    Returns
    Type Description
    Task<string>
    Exceptions
    Type Condition
    ArgumentException

    A token parsing error

    SetSelectedLoginProvider(ILoginProvider)

    Sets / chooses the active ILoginProvider.

    Declaration
    public void SetSelectedLoginProvider(ILoginProvider provider)
    Parameters
    Type Name Description
    ILoginProvider provider

    Implements

    IClientAuthenticationManager

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.