import { DBConnector } from "will-sql"; export declare class ActiveConfig { url: string; baseDN: string; domain: string | undefined; constructor(url: string, baseDN: string, domain?: string); hasConfigure(): boolean; } export declare class ActiveLibrary { static getDefaultConfigure(): ActiveConfig; static createConfigure(row: any): ActiveConfig; static getActiveConfig(conn?: DBConnector, domain?: string): Promise; authenticate(username: string, password: string, config?: ActiveConfig, conn?: DBConnector): Promise; updateUserInfo(conn: DBConnector, user: ActiveUser): Promise; createUserInfo(conn: DBConnector, user: ActiveUser, site: string): Promise; saveUserInfo(conn: DBConnector, user: ActiveUser, site?: string): Promise; } export declare class AuthenError extends Error { readonly code: number; readonly errno: number | undefined; readonly throwable: any; constructor(message: string, code: number, errno?: number, throwable?: any); } export declare class AuthenLibrary { static getDefaultResponse(): ResponseInfo; static getDefaultConfigure(site?: string): PromptConfig; static createConfigure(row: any): PromptConfig; authenticate(username: string, password: string, config?: PromptConfig, conn?: DBConnector): Promise; updateUserInfo(conn: DBConnector, user: PromptUser): Promise; createUserInfo(conn: DBConnector, user: PromptUser, site: string): Promise; saveUserInfo(conn: DBConnector, user: PromptUser, site?: string): Promise; } export interface AuthenTokenData { identifier: string; site?: string; accessor?: string; } export declare class AuthenToken { static createAuthenToken(identifier: string | AuthenTokenData, expiredIn?: string): string; static verifyAuthenToken(token: string, ignoreExpiration?: boolean): AuthenTokenData; } export declare class CaptchaLibrary { createCaptcha(conn: DBConnector, capid?: string, mathing?: string): Promise; insertCaptcha(conn: DBConnector, cap: CaptcharInfo): Promise; verifyCaptcha(conn: DBConnector, capid: string, answer: string, now?: Date): Promise; deleteCaptcha(conn: DBConnector, capid?: string): Promise; } export interface CaptcharInfo { src: string; code: string; text: string; id?: string; } declare function captchar(options?: any): Promise; export { captchar }; export declare class HTTP { static readonly BAD_REQUEST = 400; static readonly UNAUTHORIZED = 401; static readonly PAYMENT_REQUIRED = 402; static readonly FORBIDDEN = 403; static readonly NOT_FOUND = 404; static readonly NOT_ALLOWED = 405; static readonly NOT_ACCEPTABLE = 406; static readonly REGISTER_REQUIRED = 407; static readonly REQUEST_TIMEOUT = 408; static readonly CONFLICT = 409; static readonly GONE = 410; static readonly INTERNAL_SERVER_ERROR = 500; static readonly NOT_IMPLEMENTED = 501; static readonly BAD_GATEWAY = 502; static readonly SERVICE_UNAVAILABLE = 503; static readonly GATEWAY_TIMEOUT = 504; static readonly DISCONNECTED = 505; } export interface MailInfo { email: string; subject: string; message: string; cc?: string; bcc?: string; attachments?: any[]; } export interface MailConfig { host: string; port: number; user: string; pass: string; from: string; } export declare class MailLibrary { static getMailConfig(conn?: DBConnector, category?: string): Promise; static sendMail(info: MailInfo, conn?: DBConnector, config?: MailConfig, category?: string): Promise; } export interface PasswordVerify { result: boolean; msg: string | null | undefined; errno: number; args: string | null | undefined; } export interface PasswordTemporary { trxid: string | undefined; userpassword: string | undefined; passwordexpiredate: Date | undefined; } export interface UserTokenInfo { useruuid: string; userid?: string; site?: string; code?: string; state?: string; nonce?: string; prime?: string; generator?: string; privatekey?: string; publickey?: string; sharedkey?: string; otherkey?: string; tokentype?: string; tokenstatus?: string; } export interface PasswordPolicyInfo { text: string; code: string; args: any[]; } export declare class PasswordLibrary { private ht; private logondate; static parseInt(value?: string): number; static randomPassword(): string; static getAlphabets(text?: string): number; static getDigits(text?: string): number; static isDigit(c: string): boolean; static isLetter(c: string): boolean; static isLowerCase(c: string): boolean; static isUpperCase(c: string): boolean; static indexOfAlphabets(text?: string): number; static createNewPassword(): string; static checkNumberOnly(text?: string): boolean; private getPolicy; createPassword(): string; encrypt(pwd?: string, salt?: string): string; encryptPassword(pwd?: string): string; checkAlphainpwd(pwd?: string): boolean; checkDigitinpwd(pwd?: string): boolean; checkLowerinpwd(pwd?: string): boolean; checkUpperinpwd(pwd?: string): boolean; passwordValidation(pwd?: string): boolean; checkMatchPattern(pwd?: string): boolean; checkMaxarrangechar(pwd?: string): boolean; checkMaxpwdlength(pwd?: string): boolean; checkMaxsamechar(pwd?: string): boolean; checkMindiffchar(pwd?: string): boolean; checkMinpwdlength(pwd?: string): boolean; checkOtherinpwd(pwd?: string): boolean; getHashtable(): Map | undefined; comparePassword(pwd: string, storedpwd: string): boolean; checkMatchNumber(conn: DBConnector, pwd?: string): Promise; verifyPassword(conn: DBConnector, site?: string, userid?: string, pwd?: string): Promise; checkUser(conn: DBConnector, site?: string, userid?: string): Promise; checkNotchgpwduntilday(conn: DBConnector, userid?: string): Promise; checkPersonalInfo(conn: DBConnector, userid?: string, pwd?: string): Promise; checkReserveword(conn: DBConnector, pwd?: string): Promise; checkTimenotusedoldpwd(conn: DBConnector, userid?: string, pwd?: string): Promise; getUserPolicy(conn: DBConnector, userid?: string): Promise; getUserExpireDate(conn: DBConnector, userid?: string, expiredate?: Date): Promise; getUserTemporaryExpireDate(conn: DBConnector, userid: string, site?: string): Promise; insertHistory(conn: DBConnector, userid?: string, pwd?: string, serverdate?: Date, systemdate?: Date, editor?: string): Promise; moveTemporaryPassword(conn: DBConnector, userid?: string, moveflag?: boolean): Promise; moveTemporaryPasswordExpired(conn: DBConnector, userid?: string, expiredate?: Date): Promise; updatePassword(conn: DBConnector, site?: string, userid?: string, pwd?: string, expiredate?: Date, history?: boolean, changeflag?: string, status?: string): Promise; updatePasswordFromTemporary(conn: DBConnector, trxid?: string, userid?: string, changeflag?: string, history?: boolean): Promise; updateTemporaryPassword(conn: DBConnector, userid?: string, pwd?: string, site?: string, expiredate?: Date): Promise; checkPassword(conn: DBConnector, site?: string, userid?: string, oldpwd?: string, logon?: Date): Promise; changePassword(conn: DBConnector, site?: string, userid?: string, oldpwd?: string, newpwd?: string, logdate?: Date, changeflag?: string, history?: boolean): Promise; getUserTemporaryPassword(conn: DBConnector, userid: string): Promise; getPasswordPolicy(conn: DBConnector): Promise; getUserTokenInfo(conn: DBConnector, useruuid: string): Promise; getUserTokenInfoByToken(conn: DBConnector, authtoken: string): Promise; } export declare class PromptConfig { authtype: string; url: string; site?: string; domain?: string; constructor(authtype: string, url: string, site?: string, domain?: string); hasConfigure(): boolean; } export interface ActiveAccountDomain { accountName: string; domainName: string | undefined; } export interface ActiveAccount { firstName: string; lastName: string; displayName: string; } export interface ActiveUser extends ActiveAccount { accountName: string; principalName: string; commonName: string; } export declare class ActiveAuthen { static getAccountDomain(username: string): ActiveAccountDomain; private getUserName; private static getActiveAccount; isAuthenticate(username: string, password: string, config: ActiveConfig): Promise; getActiveUser(username: string, password: string, config: ActiveConfig): Promise; authenticate(username: string, password: string, config: ActiveConfig): Promise; } export interface ResponseInfo { newsUrl: string; openTab: boolean; auth_token?: string; userProfile?: any; } export declare class BaseAuthentication { getResponseInfo(): ResponseInfo; } export interface NewsRequestInfo { user: string; password: string; company: string; } export interface NewsResponseInfo extends ResponseInfo { accessToken: string; appServerUrl: string; } export declare class NewsAuthentication extends BaseAuthentication { url: string; constructor(url: string); static getInstance(): NewsAuthentication; getRequestUserInfo(): NewsRequestInfo; getHeaderConfig(): any; login(user: string, pwd: string, site?: string): Promise; } export interface PromptAccount { username: string; usersurname: string; displayname: string; } export interface PromptUser extends PromptAccount { email: string; userid?: string; userProfile?: any; } export declare class PromptAuthen { private getPromptAccount; authenticate(username: string, password: string, config: PromptConfig): Promise; } export interface PlatformInfo { os: string; osVersion: string; appVersion: string; } export interface WowRequestInfo { platform: string; platformInfo: PlatformInfo; languageId: string; countryId: string; timezoneId: string; companyCode: string; username: string; password: string; } export interface WowResponseInfo extends ResponseInfo { accessToken: string; appServerUrl: string; } export declare class WowAuthentication extends BaseAuthentication { url: string; constructor(url: string); static getInstance(): WowAuthentication; getRequestUserInfo(): WowRequestInfo; getHeaderConfig(): any; login(user: string, pwd: string, site?: string): Promise; } export interface TenantInfo { tenantid: string; tenantname: string; applicationid: string; publickeys: string; privatekeys: string; } export interface BasicInfo { username: string; password: string; } export declare class BasicLibrary { plainText?: string; static getAuthorization(authorization?: string): string | undefined; getBasicInfo(basic?: string): BasicInfo | undefined; decodeBase64(base64: string): BasicInfo | undefined; fromBase64(base64: string): string; toBase64(plainText: string): string; decodeWithKey(cipherText: string, privatekeys: string): BasicInfo | undefined; decrypt(authorization: string, client?: string, conn?: DBConnector): Promise; encodeWithKey(plainText: string, publickeys: string): string; encrypt(plainText: string, client?: string, conn?: DBConnector): Promise; getTenantInfo(conn: DBConnector, client: string): Promise; } export interface KeyPair { publicKey: string; privateKey: string; } export declare class KeyTool { static generateKeyPair(bits?: number): KeyPair; }