Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ac-node-hipchat

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ac-node-hipchat - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

20

lib/tenant-client.js

@@ -60,22 +60,2 @@ var _ = require('lodash');

if (scopes.length === 0) {
throw new Error('At least one scope is required when genereating a token');
}
self._ensureScopes(scopes);
var cacheKey = (scopes || []).join('|');
return self._cache.get(cacheKey).then(function (tokenData) {
if (tokenData) return tokenData;
var tokenUrl = self._tenant.links.token;
var username = self._tenant.id;
var password = self._tenant.secret;
return self._client.generateToken(tokenUrl, username, password, scopes);
}).then(function (tokenData) {
return self._cache.set(cacheKey, tokenData, tokenData.expires_in - 60).then(function () {
return tokenData.access_token;
});
});
};
TenantClient.prototype.getToken = function () {
var self = this;
var scopes = [].slice.call(arguments);
if (scopes.length === 0) {
throw new Error('At least one scope is required when generating a token');

@@ -82,0 +62,0 @@ }

4

package.json

@@ -5,3 +5,3 @@ {

"description": "A common module plugin for building Atlassian Connect add-ons for HipChat",
"version": "0.1.3",
"version": "0.2.0",
"author": "Atlassian (http://atlassian.com)",

@@ -17,3 +17,3 @@ "license": "Apache 2.0",

"dependencies": {
"ac-node": "^0.1.2",
"ac-node": "^0.2.0",
"check-types": "^1.3.1",

@@ -20,0 +20,0 @@ "clone": "^0.1.17",

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