token.ts 256 B

1234567891011
  1. export interface TokenProvider {
  2. getToken(): Promise<string>;
  3. }
  4. export class StaticTokenProvider implements TokenProvider {
  5. constructor(private readonly cachedToken: string) {}
  6. async getToken(): Promise<string> {
  7. return this.cachedToken;
  8. }
  9. }