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

brightspace-auth-provisioning

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brightspace-auth-provisioning - npm Package Compare versions

Comparing version 2.2.0 to 6.0.0

src/clock.js

38

package.json
{
"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 @@

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