tokenClientCredentials.ts 518 B

1234567891011121314
  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. // Licensed under the MIT License. See License.txt in the project root for license information.
  3. import { ServiceClientCredentials } from "@azure/ms-rest-js";
  4. export interface TokenResponse {
  5. readonly tokenType: string;
  6. readonly accessToken: string;
  7. readonly [x: string]: any;
  8. }
  9. export interface TokenClientCredentials extends ServiceClientCredentials {
  10. getToken<TTokenResponse extends TokenResponse>(): Promise<TokenResponse | TTokenResponse>;
  11. }