tokenCredentials.d.ts 933 B

12345678910111213141516171819202122232425
  1. import { WebResource } from "../webResource";
  2. import { ServiceClientCredentials } from "./serviceClientCredentials";
  3. /**
  4. * A credentials object that uses a token string and a authorzation scheme to authenticate.
  5. */
  6. export declare class TokenCredentials implements ServiceClientCredentials {
  7. token: string;
  8. authorizationScheme: string;
  9. /**
  10. * Creates a new TokenCredentials object.
  11. *
  12. * @constructor
  13. * @param {string} token The token.
  14. * @param {string} [authorizationScheme] The authorization scheme.
  15. */
  16. constructor(token: string, authorizationScheme?: string);
  17. /**
  18. * Signs a request with the Authentication header.
  19. *
  20. * @param {WebResource} webResource The WebResource to be signed.
  21. * @return {Promise<WebResource>} The signed request object.
  22. */
  23. signRequest(webResource: WebResource): Promise<WebResource>;
  24. }
  25. //# sourceMappingURL=tokenCredentials.d.ts.map