import { BehaviorSubject } from 'rxjs'; import { Span } from './tracing'; export interface Account { uid: string; nickname: string; type: string; lastLogin: boolean; enterpriseId?: string; enterpriseName?: string; enterpriseLogo?: string; enterpriseUserName?: string; pluginEnabled?: boolean; deployStatus?: { statusCode: number; statusMsg: string; detailMsg: string; }; } export interface AuthToken { accessToken: string; expiresIn: number; expiresAt: number; refreshExpiresIn: number; refreshExpiresAt: number; refreshToken: string; tokenType: 'Bearer'; sessionState?: number; notBeforePolicy?: string; scope: string; domain?: string; lastRefreshTime?: number; } export interface AuthSession { account: Account; auth: AuthToken; accounts?: Account[]; } export interface AuthenticationProvider { support(): Promise; createSession(ctx: SignContext): Promise; refreshSession(session: AuthSession, ctx: SignContext): Promise; removeSession(session: AuthSession): Promise; switchAccount(account: Account, authSession: AuthSession, ctx: SignContext): Promise; } export interface AuthenticationStorage { storeSessionSubject: BehaviorSubject; priority(): Promise; store(session: AuthSession): Promise; restore(): Promise; clean(): Promise; } export interface SignContext { abortController: AbortController; traceSpan: Span; } export interface ExternalUriOpener { open(uri: string): Promise; } export interface UserinfoProvider { provide(): Promise; } export interface Userinfo { userId: string; userName: string; userNickname: string; token: string; enterpriseId?: string; enterprise?: string; } //# sourceMappingURL=auth.d.ts.map