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

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

Hierarchy

Methods

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

    Parameters

    Returns undefined | User

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

    Parameters

    Returns Promise<boolean>