TypeScript typings for Security Token Service API v1beta
The Security Token Service exchanges Google or third-party credentials for a short-lived access token to Google Cloud resources.
For detailed description please check documentation.
Installing
Install typings for Security Token Service API:
npm install @types/gapi.client.sts-v1beta --save-dev
Usage
You need to initialize Google API client in your code:
gapi.load('client', () => {
});
Then load api client wrapper:
gapi.client.load(
'https://sts.googleapis.com/$discovery/rest?version=v1beta',
() => {
}
);
gapi.client.load('sts', 'v1beta', () => {
});
After that you can use Security Token Service API resources:
await gapi.client.sts.token({});