UNPKG

bam-ticketing-sdk

Version:

SDK for B.A.M Ticketing API

23 lines 1.14 kB
import { Jwt } from '../auth/types'; import { AuthService } from '../auth'; import { RefreshableJwt } from '..'; import { ICredential, CredentialType } from './credential'; /** * Allows for the impersonation scenario to have automatic refreshes of the token. * The refreshes are done with the impersonatorToken since we cannot refresh an impersonated token */ export declare class ImpersonateCredentials implements ICredential { private impersonatorJwt; private impersonatedId; readonly type: CredentialType.Impersonate; private impersonatedJwt; private impersonatedOrganizer?; /** Uses the impersonatorJwt to obtain an impersonation token for the impersonatedId */ constructor(impersonatorJwt: Jwt | RefreshableJwt, impersonatedId: number); getToken(): Jwt | RefreshableJwt; getImpersonatorToken(): Jwt | RefreshableJwt; authorize(authService: AuthService, organizer?: string): Promise<Jwt | RefreshableJwt>; refreshToken(authService: AuthService, organizer?: string): Promise<Jwt | RefreshableJwt>; private hasOrganizerInToken; } //# sourceMappingURL=impersonate-credentials.d.ts.map