File
|
x-goog-iam-authority-selector
|
x-goog-iam-authority-selector: string
|
Type : string
|
|
x-goog-iam-authorization-token
|
x-goog-iam-authorization-token: string
|
Type : string
|
export interface RequestMetadata {
'x-goog-iam-authority-selector': string;
'x-goog-iam-authorization-token': string;
}
export class IAMAuth {
/**
* IAM credentials.
*
* @param selector the iam authority selector
* @param token the token
* @constructor
*/
constructor(public selector: string, public token: string) {
this.selector = selector;
this.token = token;
}
/**
* Acquire the HTTP headers required to make an authenticated request.
*/
getRequestHeaders() {
return {
'x-goog-iam-authority-selector': this.selector,
'x-goog-iam-authorization-token': this.token,
};
}
}