Socket
Socket
Sign inDemoInstall

gapitoken-generic

Package Overview
Dependencies
85
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.4 to 0.0.5

34

gapitoken.js

@@ -17,19 +17,19 @@ var https = require('https');

this.port = options.port;
this.grant = encodeURIComponent(options.grant) || 'urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer';
this.grant = options.grant || 'urn:ietf:params:oauth:grant-type:jwt-bearer';
if (options.keyFile) {
var self = this;
process.nextTick(function() {
fs.readFile(options.keyFile, function(err, res) {
if (err) { return callback(err); }
self.key = res;
callback();
});
});
} else if (options.key) {
this.key = options.key;
process.nextTick(callback);
} else {
callback(new Error("Missing key, key or keyFile option must be provided!"));
}
if (options.keyFile) {
var self = this;
process.nextTick(function() {
fs.readFile(options.keyFile, function(err, res) {
if (err) { return callback(err); }
self.key = res;
callback();
});
});
} else if (options.key) {
this.key = options.key;
process.nextTick(callback);
} else {
callback(new Error("Missing key, key or keyFile option must be provided!"));
}
};

@@ -68,3 +68,3 @@

var post_data = 'grant_type=' + this.grant + '&assertion=' + signedJWT;
var post_data = 'grant_type=' + encodeURIComponent(this.grant) + '&assertion=' + signedJWT;
var post_options = {

@@ -71,0 +71,0 @@ host: this.host,

{
"name": "gapitoken-generic",
"version": "0.0.4",
"version": "0.0.5",
"description": "Node.js module for Google-compatible API service account authorization (Server to Server flow)",

@@ -5,0 +5,0 @@ "main": "gapitoken.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc