brightspace-auth-provisioning
Advanced tools
Comparing version 2.2.0 to 6.0.0
{ | ||
"name": "brightspace-auth-provisioning", | ||
"version": "2.2.0", | ||
"version": "6.0.0", | ||
"description": "Make token assertions against an auth service", | ||
"main": "src/index.js", | ||
"files": [ | ||
"src", | ||
"LICENSE", | ||
"README.md" | ||
], | ||
"scripts": { | ||
"check-style": "eslint .", | ||
"test": "npm run check-style" | ||
"test": "true" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Brightspace/node-auth-provisioning.git" | ||
"peerDependencies": { | ||
"brightspace-auth-keys": "6.0.0" | ||
}, | ||
"author": "D2L Corporation", | ||
"license": "Apache-2.0", | ||
"bugs": { | ||
"url": "https://github.com/Brightspace/node-auth-provisioning/issues" | ||
"url": "https://github.com/Brightspace/node-auth/issues" | ||
}, | ||
"homepage": "https://github.com/Brightspace/node-auth-provisioning", | ||
"homepage": "https://github.com/Brightspace/node-auth#readme", | ||
"license": "Apache-2.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/Brightspace/node-auth.git" | ||
}, | ||
"dependencies": { | ||
"bluebird": "^3.3.5", | ||
"jws": "^3.1.3", | ||
"querystringparser": "^0.1.1", | ||
"superagent": "^1.8.3", | ||
"uuid": "^3.0.1", | ||
"jws": "^3.1.4", | ||
"promised-method": "^1.0.0", | ||
"superagent": "^3.8.2", | ||
"uuid": "^3.1.0", | ||
"xtend": "^4.0.1" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^3.16.0", | ||
"eslint-config-brightspace": "^0.2.4" | ||
} | ||
} |
# brightspace-auth-provisioning | ||
[![Build Status](https://travis-ci.org/Brightspace/node-auth-provisioning.svg?branch=master)](https://travis-ci.org/Brightspace/node-auth-provisioning) | ||
[![Build Status](https://travis-ci.org/Brightspace/node-auth.svg?branch=master)](https://travis-ci.org/Brightspace/node-auth) | ||
@@ -107,30 +107,1 @@ Library for making assertions against an auth service. | ||
Available on the export is a reference to the `AbstractProvisioningCache` | ||
## Testing | ||
```bash | ||
npm test | ||
``` | ||
## Contributing | ||
1. **Fork** the repository. Committing directly against this repository is | ||
highly discouraged. | ||
2. Make your modifications in a branch, updating and writing new unit tests | ||
as necessary in the `spec` directory. | ||
3. Ensure that all tests pass with `npm test` | ||
4. `rebase` your changes against master. *Do not merge*. | ||
5. Submit a pull request to this repository. Wait for tests to run and someone | ||
to chime in. | ||
### Code Style | ||
This repository is configured with [EditorConfig][EditorConfig] and | ||
[ESLint][ESLint] rules. | ||
[EditorConfig]: http://editorconfig.org/ | ||
[ESLint]: http://eslint.org |
@@ -5,6 +5,8 @@ 'use strict'; | ||
jws = require('jws'), | ||
Promise = require('bluebird'), | ||
promised = require('promised-method'), | ||
qs = require('querystring'), | ||
xtend = require('xtend'); | ||
var clock = require('./clock'); | ||
var DEFAULT_EXPIRY_SECONDS = 60 * 60, | ||
@@ -20,9 +22,7 @@ EXPIRY_BUFFER_TIME_SECONDS = 2 * 60; | ||
function clock() { | ||
return Math.round(Date.now() / 1000); | ||
} | ||
function noop() {} | ||
function AbstractProvisioningCache() {} | ||
AbstractProvisioningCache.prototype.get = Promise.method(/* @this */ function get(claims, scope) { | ||
AbstractProvisioningCache.prototype.get = promised(/* @this */ function get(claims, scope) { | ||
if ('object' !== typeof claims) { | ||
@@ -67,3 +67,3 @@ throw new Error('"claims" must be an Object'); | ||
AbstractProvisioningCache.prototype.set = Promise.method(/* @this */ function set(claims, scope, token) { | ||
AbstractProvisioningCache.prototype.set = promised(/* @this */ function set(claims, scope, token) { | ||
if ('object' !== typeof claims) { | ||
@@ -99,3 +99,3 @@ throw new Error('"claims" must be an Object'); | ||
.resolve(this._set(key, token, expiry)) | ||
.return(undefined); | ||
.then(noop); | ||
}); | ||
@@ -102,0 +102,0 @@ |
'use strict'; | ||
var jws = require('jws'), | ||
Promise = require('bluebird'), | ||
qs = require('querystringparser'), | ||
promised = require('promised-method'), | ||
qs = require('querystring'), | ||
request = require('superagent'), | ||
@@ -10,3 +10,4 @@ uuid = require('uuid/v4'), | ||
var AbstractProvisioningCache = require('./abstract-provisioning-cache'); | ||
var AbstractProvisioningCache = require('./abstract-provisioning-cache'), | ||
clock = require('./clock'); | ||
@@ -20,6 +21,2 @@ var ASSERTION_AUDIENCE = 'https://api.brightspace.com/auth/token', | ||
function clock() { | ||
return Math.round(Date.now() / 1000); | ||
} | ||
function AuthTokenProvisioner(opts) { | ||
@@ -56,3 +53,3 @@ if (!(this instanceof AuthTokenProvisioner)) { | ||
AuthTokenProvisioner.prototype.provisionToken = Promise.method(/* @this */ function provisionToken(opts) { | ||
AuthTokenProvisioner.prototype.provisionToken = promised(/* @this */ function provisionToken(opts) { | ||
var self = this; | ||
@@ -59,0 +56,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
6
228
21998
107
+ Addedpromised-method@^1.0.0
+ Addedasn1.js@4.10.1(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedbindings@1.5.0(transitive)
+ Addedbn.js@4.12.15.2.1(transitive)
+ Addedbrightspace-auth-keys@6.0.0(transitive)
+ Addedbrorand@1.1.0(transitive)
+ Addedbrowserify-aes@1.2.0(transitive)
+ Addedbrowserify-rsa@4.1.1(transitive)
+ Addedbrowserify-sign@4.2.3(transitive)
+ Addedbuffer-xor@1.0.3(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedcipher-base@1.0.6(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedcookiejar@2.1.4(transitive)
+ Addedcreate-ecdh@4.0.4(transitive)
+ Addedcreate-hash@1.2.0(transitive)
+ Addedcreate-hmac@1.1.7(transitive)
+ Addeddebug@3.2.7(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addedelliptic@6.6.1(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedevp_bytestokey@1.0.3(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addedform-data@2.5.2(transitive)
+ Addedformidable@1.2.6(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhash-base@3.0.5(transitive)
+ Addedhash.js@1.1.7(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhmac-drbg@1.0.1(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedjwk-to-pem@1.2.6(transitive)
+ Addedmd5.js@1.3.5(transitive)
+ Addedmiller-rabin@4.0.1(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedminimalistic-assert@1.0.1(transitive)
+ Addedminimalistic-crypto-utils@1.0.1(transitive)
+ Addedms@2.1.3(transitive)
+ Addednan@2.22.02.3.5(transitive)
+ Addednative-crypto@1.8.1(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedparse-asn1@5.1.7(transitive)
+ Addedpbkdf2@3.1.2(transitive)
+ Addedpemstrip@0.0.1(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedpromised-method@1.0.0(transitive)
+ Addedpublic-encrypt@4.0.3(transitive)
+ Addedqs@6.13.1(transitive)
+ Addedrandombytes@2.1.0(transitive)
+ Addedraw-ecdsa@1.1.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedripemd160@2.0.2(transitive)
+ Addedrsa-keygen@1.0.6(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedsha.js@2.4.11(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedsuperagent@3.8.3(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedbluebird@^3.3.5
- Removedquerystringparser@^0.1.1
- Removedasync@1.5.2(transitive)
- Removedbluebird@3.7.2(transitive)
- Removedcomponent-emitter@1.2.1(transitive)
- Removedcookiejar@2.0.6(transitive)
- Removedextend@3.0.0(transitive)
- Removedform-data@1.0.0-rc3(transitive)
- Removedformidable@1.0.17(transitive)
- Removedisarray@0.0.1(transitive)
- Removedmime@1.3.4(transitive)
- Removedqs@2.3.3(transitive)
- Removedquerystringparser@0.1.1(transitive)
- Removedreadable-stream@1.0.27-1(transitive)
- Removedreduce-component@1.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedsuperagent@1.8.5(transitive)
Updatedjws@^3.1.4
Updatedsuperagent@^3.8.2
Updateduuid@^3.1.0