@itwin/core-frontend
Version:
iTwin.js frontend components
23 lines • 1.21 kB
TypeScript
import { RequestBasicCredentials } from "./Request";
/**
* Check whether or not one of the requested authentication method is listed in the HTTP 'WWW-Authenticate' response header
* @param headers Headers object
* @param query List of authentication method to lookup (case-insensitive)
* @note For CORS requests, the 'Access-Control-Expose-Headers' header from the server must make the 'WWW-Authenticate' available to the browser, otherwise this won't work.
* @internal
*/
export declare function headersIncludeAuthMethod(headers: Headers, query: string[]): boolean;
/**
* Set the value of the 'Authorization' header with Basic authentication value
* scheme: 'Authorization: Basic <credentials>'
* @internal
*/
export declare function setBasicAuthorization(headers: Headers, credentials: RequestBasicCredentials): void;
/** @internal */
export declare function setBasicAuthorization(headers: Headers, user: string, password: string): void;
/**
* Set number of milliseconds a request can take before automatically being terminated
* @internal
*/
export declare function setRequestTimeout(opts: RequestInit, ms: number, abortController?: AbortController): void;
//# sourceMappingURL=utils.d.ts.map