Search Results for

    Show / Hide Table of Contents

    Class DanglIdentityAppTokenHandler

    This handle is used to authenticate against apps that use the Dangl.Identity.Client.Mvc library. This means the servers do themselves provide a username / password login functionality but do delegate this internally to Dangl.Identity.

    Inheritance
    System.Object
    DanglIdentityAppTokenHandler
    Implements
    Dangl.RestClient.ITokenHandler
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Dangl.Identity.Client.App
    Assembly: Dangl.Identity.Client.App.dll
    Syntax
    public class DanglIdentityAppTokenHandler : ITokenHandler

    Constructors

    | Improve this Doc View Source

    DanglIdentityAppTokenHandler(String, ITokenStorage, String, String, HttpClient)

    This handle is used to authenticate against apps that use the Dangl.Identity.Client.Mvc library. This means the servers do themselves provide a username / password login functionality but do delegate this internally to Dangl.Identity.

    Declaration
    public DanglIdentityAppTokenHandler(string baseUrl, ITokenStorage tokenStorage, string userIdentifier = null, string userPassword = null, HttpClient httpClient = null)
    Parameters
    Type Name Description
    System.String baseUrl
    Dangl.RestClient.ITokenStorage tokenStorage
    System.String userIdentifier
    System.String userPassword
    System.Net.Http.HttpClient httpClient

    Properties

    | Improve this Doc View Source

    CanGetToken

    This returns true if the instance was instantiated with both an user identifier and a password. A new token can be obtained if both user identifier and password are known.

    Declaration
    public bool CanGetToken { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CanRefreshToken

    This always returns true

    Declaration
    public bool CanRefreshToken { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    | Improve this Doc View Source

    GetAndStoreTokenAsync()

    This will perform a login with user identifier and password via the Dangl.Identity.Client.Mvc controller

    Declaration
    public async Task<OAuthToken> GetAndStoreTokenAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<Dangl.RestClient.OAuthToken>
    | Improve this Doc View Source

    RefreshAndStoreTokenAsync()

    This will try to refresh the token via the Dangl.Identity.Client.Mvc controller on the target server.

    Declaration
    public async Task<OAuthToken> RefreshAndStoreTokenAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<Dangl.RestClient.OAuthToken>
    | Improve this Doc View Source

    SetUserCredentials(String, String)

    This method can be used

    Declaration
    public void SetUserCredentials(string userIdentifier, string userPassword)
    Parameters
    Type Name Description
    System.String userIdentifier
    System.String userPassword

    Events

    | Improve this Doc View Source

    TokenUpdate

    This event is raised when a token is refreshed or obtained

    Declaration
    public event EventHandler<TokenUpdateEventArgs> TokenUpdate
    Event Type
    Type Description
    System.EventHandler<Dangl.RestClient.TokenUpdateEventArgs>

    Implements

    Dangl.RestClient.ITokenHandler
    • Improve this Doc
    • View Source
    In This Article
    Back to top © Dangl IT GmbH