Socket
Socket
Sign inDemoInstall

google-auth-library

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-auth-library - npm Package Compare versions

Comparing version 0.9.6 to 0.9.7

15

CHANGELOG.md

@@ -0,1 +1,11 @@

## 0.9.7 (11/06/2015)
### Changes
* Accept either "accounts.google.com" or "https://accounts.google.com" as the issuer of the ID token issued by Google. ([@mcduan][])
* Update to prevent status code 200 messages from being flagged as errors. ([@ryan-devrel][])
* Update async & request ([@josephpage][])
* Update oauthclient2.js ([@riblee][])
* Update README.md ([@ofrobots][])
## 0.9.6 (05/21/2015)

@@ -27,3 +37,8 @@

[@jasonall]: https://github.com/jasonall
[@josephpage]: https://github.com/josephpage
[@mcduan]: https://github.com/mcduan
[@ofrobots]: https://github.com/ofrobots
[@riblee]: https://github.com/riblee
[@ryan-devrel]: https://github.com/ryan-devrel
[@stephenplusplus]: https://github.com/stephenplusplus
[@tbetbetbe]: https://github.com/tbetbetbe

17

lib/auth/oauth2client.js

@@ -35,3 +35,3 @@ /**

* @param {string} redirectUri The URI to redirect to after completing the auth request.
* @param {Object} opt_options optional options for overriding the given parameters.
* @param {Object} opt_opts optional options for overriding the given parameters.
* @constructor

@@ -101,7 +101,7 @@ */

/**
* The oauth token issuer.
* The allowed oauth token issuers.
* @const
* @private
*/
OAuth2Client.ISSUER_ = 'accounts.google.com';
OAuth2Client.ISSUERS_ = ['accounts.google.com', 'https://accounts.google.com'];

@@ -405,3 +405,3 @@ /**

login = this.verifySignedJwtWithCerts(idToken, certs, audience,
OAuth2Client.ISSUER_);
OAuth2Client.ISSUERS_);
} catch (err) {

@@ -463,3 +463,3 @@ callback(err);

* @param {string} requiredAudience The audience to test the jwt against.
* @param {string} issuer The issuer of the jwt (Optional).
* @param {array} issuers The allowed issuers of the jwt (Optional).
* @param {string} maxExpiry The max expiry the certificate can be (Optional).

@@ -469,3 +469,3 @@ * @return {LoginTicket} Returns a LoginTicket on verification.

OAuth2Client.prototype.verifySignedJwtWithCerts =
function(jwt, certs, requiredAudience, issuer, maxExpiry) {
function(jwt, certs, requiredAudience, issuers, maxExpiry) {

@@ -538,4 +538,5 @@ if (!maxExpiry) {

if (issuer && issuer !== payload.iss) {
throw new Error('Invalid issuer, ' + issuer + ' != ' + payload.iss);
if (issuers && issuers.indexOf(payload.iss) < 0) {
throw new Error('Invalid issuer, expected one of [' + issuers +
'], but got ' + payload.iss);
}

@@ -542,0 +543,0 @@

@@ -76,3 +76,3 @@ /**

if (body && body.error) {
if (body && body.error && res.statusCode !== 200) {
if (typeof body.error === 'string') {

@@ -79,0 +79,0 @@ err = new Error(body.error);

{
"name": "google-auth-library",
"version": "0.9.6",
"version": "0.9.7",
"author": "Google Inc.",

@@ -32,7 +32,7 @@ "description": "Google APIs Authentication Client Library for Node.js",

"dependencies": {
"async": "~0.9.0",
"async": "~1.4.2",
"gtoken": "^1.1.0",
"lodash.noop": "~3.0.0",
"jws": "~3.0.0",
"request": "~2.51.0",
"request": "~2.60.0",
"string-template": "~0.2.0"

@@ -39,0 +39,0 @@ },

@@ -35,6 +35,6 @@ # Google APIs Node.js Client

``` js
var google = require('googleapis');
var GoogleAuth = require('google-auth-library');
// Get the environment configured authorization
google.auth.getApplicationDefault(function(err, authClient) {
(new GoogleAuth).getApplicationDefault(function(err, authClient) {
if (err === null) {

@@ -47,3 +47,3 @@ // Inject scopes if they have not been injected by the environment

];
authClient = authClient.createScoped(scopes)
authClient = authClient.createScoped(scopes);
}

@@ -50,0 +50,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc