UNPKG

@nibssplc/cams-sdk

Version:

Central Authentication Management Service (CAMS) SDK for popup-based authentication with Azure AD + custom 2FA

30 lines (29 loc) 764 B
export interface CAMSConfig { camsUrl: string; allowedOrigin: string; windowWidth: number; windowHeight: number; timeout?: number; allowedDomains?: string[]; storageKey?: string; retryAttempts?: number; debug?: boolean; } export declare enum CAMSErrorType { POPUP_BLOCKED = "POPUP_BLOCKED", TIMEOUT = "TIMEOUT", INVALID_ORIGIN = "INVALID_ORIGIN", USER_CANCELLED = "USER_CANCELLED", INVALID_URL = "INVALID_URL", MAX_RETRIES_EXCEEDED = "MAX_RETRIES_EXCEEDED" } export declare class CAMSError extends Error { type: CAMSErrorType; constructor(type: CAMSErrorType, message: string); } export interface CAMSTokenResponse { token: string; } export interface CAMSErrorResponse { error: string; }