How to use the gtoken.GoogleToken function in gtoken

To help you get started, we’ve selected a few gtoken examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github googleapis / google-auth-library-nodejs / src / auth / jwtclient.ts View on Github external
private createGToken(
      callback: (err: Error|null, token: GoogleToken) => void) {
    if (this.gtoken) {
      return callback(null, this.gtoken);
    } else {
      const opts = {
        iss: this.email,
        sub: this.subject,
        scope: this.scopes,
        keyFile: this.keyFile,
        key: this.key
      } as TokenOptions;
      this.gtoken = new GoogleToken(opts);
      return callback(null, this.gtoken);
    }
  }
}
github ruslang02 / atomos / node_modules / google-auth-library / build / src / auth / jwtclient.js View on Github external
JWT.prototype.createGToken = function () {
        if (!this.gtoken) {
            this.gtoken = new gtoken_1.GoogleToken({
                iss: this.email,
                sub: this.subject,
                scope: this.scopes,
                keyFile: this.keyFile,
                key: this.key,
                additionalClaims: this.additionalClaims
            });
        }
        return this.gtoken;
    };
    /**

gtoken

Node.js Google Authentication Service Account Tokens

MIT
Latest version published 11 months ago

Package Health Score

91 / 100
Full package analysis

Popular gtoken functions