import { AuthenticationMode } from "cmf.core/src/domain/extensions/security"; /** Nested dependencies */ import Cmf from "cmf.lbos"; export declare enum AuthMode { Credentials = 0, Token = 1, SSO = 2 } /** * Used to define which authentication process is being made */ export declare enum AuthOperation { Login = 0, Sign = 1, Unlock = 2 } export { AuthenticationMode }; /** * Interface to an Authentication Provider. * By implementing this interface, the class can be used to validate the user validation. */ export interface AuthProviderInterface { /** * Validates an user by its username and password. * @param identifier Validation identifier (username) * @param secret Validation secret (password) */ validateCredentials(identifier: string, secret: string): Promise; /** * Validates an user by its token and pin. * @param token Validation token * @param pin Validation pin */ validateToken(token: string, pin: string): Promise; } export declare class AuthProvider implements AuthProviderInterface { private parentProvider; private _generic; constructor(parentProvider: AuthProvider); validateCredentials(identifier: string, secret: string, remember?: boolean): Promise; validateToken(token: string, pin: string): Promise; }