Interface UserAdminService

Service used to login/logout a user. Available as service with interface ct.framework.api.UserAdmin

interface UserAdminService {
    getAuthentication(): Authentication;
    getAuthorization(authentication?): Authorization;
    getUser(authentication?): undefined | User;
    login(credentials?, options?): Promise<Authentication>;
    logout(authentication?): Promise<boolean>;
    on<Name>(name, callBack): Handle;
}

Hierarchy

Methods

  • Creates an Authorization object that provides access to the roles of the current user.

    Parameters

    Returns Authorization

  • Creates an User object that provides access to properties of the current user. (normally triggered via: getAuthentication().getUser(); )

    Parameters

    Returns undefined | User

  • Performs a login. options is only {refresh:true}, which marks that no events are triggered!

    Parameters

    Returns Promise<Authentication>

  • Triggers logout of an Authentication instance (normally triggered via: getAuthentication().logout();

    Parameters

    Returns Promise<boolean>

Generated using TypeDoc