Search Results for

    Show / Hide Table of Contents

    Interface IAuthenticationProvider

    Interface for any authentication provider

    Namespace: Simplic.Framework.Base.Auth
    Assembly: Simplic.Framework.Base.dll
    Syntax
    public interface IAuthenticationProvider

    Methods

    | Improve this Doc View Source

    AuthorizeAsync(IIdentity)

    Get the principal which belongs to authenticated user

    Declaration
    Task<UserPrincipal> AuthorizeAsync(IIdentity identity)
    Parameters
    Type Name Description
    System.Security.Principal.IIdentity identity

    Identity instance for authorization

    Returns
    Type Description
    System.Threading.Tasks.Task<UserPrincipal>

    Principal if valid identity, else null

    | Improve this Doc View Source

    LoginAsync(String, String)

    Login a user and return it's identity

    Declaration
    Task<UserIdentity> LoginAsync(string userName, string password)
    Parameters
    Type Name Description
    System.String userName

    Unique username

    System.String password

    Not hashed password

    Returns
    Type Description
    System.Threading.Tasks.Task<UserIdentity>

    identity if found and valid, else null

    | Improve this Doc View Source

    LoginByApiKeyAsync(String, String)

    Login a user by API key and return it's identity.

    Declaration
    Task<UserIdentity> LoginByApiKeyAsync(string userName, string apiKey)
    Parameters
    Type Name Description
    System.String userName

    Unique username

    System.String apiKey

    API key

    Returns
    Type Description
    System.Threading.Tasks.Task<UserIdentity>

    identity if found and valid, else null

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx