Show / Hide Table of Contents

    Interface IUserInfoService

    This service can be used in web applications that use Dangl.Identity for authentication ///

    Namespace: Dangl.Identity.Client.Mvc.Services
    Assembly: Dangl.Identity.Client.Mvc.dll
    Syntax
    public interface IUserInfoService

    Methods

    | Improve this Doc View Source

    ClientIsAuthenticatedAsync()

    Returns true if a client is authenticated. This is also true if a user is authenticated via a Jwt token generated for a client.

    Declaration
    Task<bool> ClientIsAuthenticatedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>
    | Improve this Doc View Source

    GetClientClaimsAsync()

    This returns all claims prefixed with "client_" for the current principal.

    Declaration
    Task<List<Claim>> GetClientClaimsAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<System.Security.Claims.Claim>>
    | Improve this Doc View Source

    GetCurrentClientIdAsync()

    Returns the ClientId from the currently authenticated client

    Declaration
    Task<string> GetCurrentClientIdAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.String>
    | Improve this Doc View Source

    GetCurrentUserEmailAsync()

    This relies on an actual user being authenticated. Will return null if no user is authenticated.

    Declaration
    Task<string> GetCurrentUserEmailAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.String>
    | Improve this Doc View Source

    GetCurrentUserIdAsync()

    This relies on an actual user being authenticated. This will throw if no user is authenticated.

    Declaration
    Task<Guid> GetCurrentUserIdAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Guid>
    | Improve this Doc View Source

    GetCurrentUserIdenticonIdAsync()

    This relies on an actual user being authenticated. This will throw if no user is authenticated.

    Declaration
    Task<Guid> GetCurrentUserIdenticonIdAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Guid>
    | Improve this Doc View Source

    GetCurrentUserNameAsync()

    This relies on an actual user being authenticated. Will return null if no user is authenticated.

    Declaration
    Task<string> GetCurrentUserNameAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.String>
    | Improve this Doc View Source

    GetUserClaimsAsync()

    Returns a list of all the user claims. This includes client claims that are prefixed with "client_".

    Declaration
    Task<List<Claim>> GetUserClaimsAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<System.Security.Claims.Claim>>
    | Improve this Doc View Source

    UserIsAuthenticatedAsync()

    Returns true if the current principal is a user. False if only a client is authenticated.

    Declaration
    Task<bool> UserIsAuthenticatedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    Extension Methods

    ObjectExtensions.Clone<T>(T)
    • Improve this Doc
    • View Source
    Back to top © Dangl IT - Georg Dangl