UNPKG

tickethead-sdk

Version:

SDK for the Tickethead API

24 lines 1.13 kB
import { Jwt } from '../auth/types'; import { AuthService } from '../auth'; import { RefreshableJwt } from '..'; import { ICredential } 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 { impersonatorJwt: RefreshableJwt; readonly impersonatedId: number; readonly type: "Impersonate"; private impersonatedJwt; private impersonatedOrganizer?; /** Uses the impersonatorJwt to obtain an impersonation token for the impersonatedId */ constructor(impersonatorJwt: RefreshableJwt, impersonatedId: number); getToken(): Jwt; getImpersonatorToken(): RefreshableJwt; authorize(authService: AuthService, organizer?: string): Promise<Jwt | RefreshableJwt>; refreshToken(authService: AuthService, organizer?: string): Promise<Jwt | RefreshableJwt>; private hasOrganizerInToken; isRefreshable(): boolean; } //# sourceMappingURL=impersonate-credentials.d.ts.map