auth.d.ts 1.2 KB

1234567891011121314151617181920212223
  1. import ifm = require('./interfaces');
  2. export declare class BasicCredentialHandler implements ifm.IRequestHandler {
  3. username: string;
  4. password: string;
  5. constructor(username: string, password: string);
  6. prepareRequest(options: any): void;
  7. canHandleAuthentication(response: ifm.IHttpClientResponse): boolean;
  8. handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise<ifm.IHttpClientResponse>;
  9. }
  10. export declare class BearerCredentialHandler implements ifm.IRequestHandler {
  11. token: string;
  12. constructor(token: string);
  13. prepareRequest(options: any): void;
  14. canHandleAuthentication(response: ifm.IHttpClientResponse): boolean;
  15. handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise<ifm.IHttpClientResponse>;
  16. }
  17. export declare class PersonalAccessTokenCredentialHandler implements ifm.IRequestHandler {
  18. token: string;
  19. constructor(token: string);
  20. prepareRequest(options: any): void;
  21. canHandleAuthentication(response: ifm.IHttpClientResponse): boolean;
  22. handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise<ifm.IHttpClientResponse>;
  23. }