import { Jwt, KeyPair, UserPassword, RefreshableJwt, ServiceAccessData, } from '..' import { AuthService } from '../auth' export enum CredentialType { Jwt = 'jwt', Guest = 'guest', Wallet = 'wallet', Service = 'service', Password = 'password', ApiKey = 'api-key', Impersonate = 'impersonate' } export interface ICredentialData { type: CredentialType jwt: Jwt keyPair?: KeyPair credentials?: UserPassword | ServiceAccessData } export interface ICredential { type: CredentialType getToken(): Jwt | RefreshableJwt authorize(authService: AuthService, organizer?: string): Promise refreshToken(authService: AuthService, organizer?: string): Promise }