UNPKG

sso-module-punch

Version:

Single Sign On Sign in module for nodejs packages

85 lines (84 loc) 1.66 kB
/** * IUser */ interface IUser { id?: string; username?: string; roles?: number[]; } /** * IUser */ export interface ITokenInterface { exp: number; userID: string; username: string; roles: number[]; } /** * */ export declare class SSOModule { private mSSOUrl; private mAuthUrl; private mUserDetail; private mExpirationDate; private mApplicationKey; private mApplicationName; private mRoles; private mAuthenticated; private mToken; private pVerify; private pForwarding; private pUnauthenticated; private key; /** * * @param body */ set unauthenticatedHtml(body: string); /** * * @param body */ set verifyHtml(body: string); /** * * @param body */ set forwardingHtml(body: string); /** * * @param ApplicationName */ set applicationName(ApplicationName: string); /** * * @param ApplicationKey */ set applicationKey(ApplicationKey: string); /** * * @param publicKey */ set publicKey(publicKey: string); set ssoUrl(SSOUrl: string); set authUrl(AuthUrl: string); set roles(roles: number[]); get rawToken(): string; get authenticated(): boolean; get ssoUrl(): string; get authUrl(): string; get verifyUrl(): string; get user(): IUser; get roles(): number[]; addRole(role: number): void; checkAuthenticated(): boolean; private checkSSOToken; Authenticate(): Promise<true | undefined>; private toLogin; private verifyToken; private verifyJWT; private DecodeJWT; } export {};