UNPKG

@jhzhu89/azure-client-pool

Version:

Azure client lifecycle management with intelligent caching and authentication

23 lines 882 B
import { ParsedJwtToken } from "./jwt/token.js"; import { AuthMode } from "../types.js"; interface BaseAuthContext { readonly mode: AuthMode; } export interface ApplicationAuthContext extends BaseAuthContext { readonly mode: typeof AuthMode.Application; } export interface TokenBasedAuthContext extends BaseAuthContext { readonly mode: typeof AuthMode.Delegated | typeof AuthMode.Composite; readonly tenantId: string; readonly userObjectId: string; readonly accessToken: string; readonly expiresAt: number; } export type AuthContext = ApplicationAuthContext | TokenBasedAuthContext; export declare const AuthContextFactory: { application: () => ApplicationAuthContext; delegated: (token: ParsedJwtToken) => TokenBasedAuthContext; composite: (token: ParsedJwtToken) => TokenBasedAuthContext; }; export {}; //# sourceMappingURL=context.d.ts.map