tickethead-sdk
Version:
SDK for the Tickethead API
26 lines • 958 B
TypeScript
import { Jwt, KeyPair, UserPassword, RefreshableJwt, ServiceAccessData } from '..';
import { AuthService } from '../auth';
export declare const CredentialType: {
readonly Jwt: "Jwt";
readonly Guest: "Guest";
readonly Wallet: "Wallet";
readonly Service: "Service";
readonly Password: "Password";
readonly ApiKey: "ApiKey";
readonly Impersonate: "Impersonate";
};
export type CredentialEnum = (typeof CredentialType)[keyof typeof CredentialType];
export interface ICredentialData {
type: CredentialEnum;
jwt: Jwt;
keyPair?: KeyPair;
credentials?: UserPassword | ServiceAccessData;
}
export interface ICredential {
type: keyof typeof CredentialType;
getToken(): Jwt | RefreshableJwt;
authorize(authService: AuthService, organizer?: string): Promise<Jwt>;
refreshToken(authService: AuthService, organizer?: string): Promise<Jwt>;
isRefreshable(): boolean;
}
//# sourceMappingURL=credential.d.ts.map