Skip to main content
Module

x/google_datastore/auth.ts>OAuth2Token

A set of APIs that allow interfacing to Google Datastore on GCP from Deno.
Go to Latest
class OAuth2Token
import { OAuth2Token } from "https://deno.land/x/google_datastore@0.0.14/auth.ts";

A class that wraps the response from the Google APIs OAuth2 token service.

Constructors

new
OAuth2Token(json: OAuth2TokenJson)

Properties

readonly
accessToken: string

The raw access token string.

readonly
expired: boolean

Returns if the true if the token has expired, otherwise false.

readonly
expiresIn: number

The number of seconds until the token expires. If less than or equal to 0 then the token has expired.

readonly
scope: string | undefined

Any scopes returned in the authorization response.

readonly
tokenType: string

The type of token that was returned.

Methods

toString(): string

Returns the token as a value for an Authorization: header.