Skip to content

Commit

Permalink
fix: use updated jose package
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Oct 1, 2019
1 parent 1fb3387 commit ee17022
Show file tree
Hide file tree
Showing 21 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion certification/fapi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { readFileSync } = require('fs');
const path = require('path');
const https = require('https');

const jose = require('@panva/jose');
const jose = require('jose');
const helmet = require('koa-helmet');
const pem = require('https-pem');

Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ _**recommendation**_: **Provider key rotation** - The following action order is
<br>

```js
const { JWKS: { KeyStore } } = require('@panva/jose');
const { JWKS: { KeyStore } } = require('jose');
const keystore = new KeyStore();
keystore.generateSync('RSA', 2048, {
alg: 'RS256',
Expand All @@ -589,7 +589,7 @@ Re-using the same keys for both encryption and signing is discouraged so it is b


```js
const { JWKS: { KeyStore } } = require('@panva/jose');
const { JWKS: { KeyStore } } = require('jose');
const keystore = new KeyStore();
Promise.all([
keystore.generate('RSA', 2048, {
Expand Down
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Further resources

Useful to know oidc-provider dependencies
- [Koa](https://koajs.com/) - web framework oidc-provider uses internally
- [@panva/jose](https://github.com/panva/jose) - everything JOSE
- [jose](https://github.com/panva/jose) - everything JOSE
4 changes: 2 additions & 2 deletions lib/helpers/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ const DEFAULTS = {
* example: Generating keys
*
* ```js
* const { JWKS: { KeyStore } } = require('@panva/jose');
* const { JWKS: { KeyStore } } = require('jose');
* const keystore = new KeyStore();
* keystore.generateSync('RSA', 2048, {
* alg: 'RS256',
Expand All @@ -1523,7 +1523,7 @@ const DEFAULTS = {
* one with `{ use: 'sig' }` and another with `{ use: 'enc' }`, e.g.
*
* ```js
* const { JWKS: { KeyStore } } = require('@panva/jose');
* const { JWKS: { KeyStore } } = require('jose');
* const keystore = new KeyStore();
* Promise.all([
* keystore.generate('RSA', 2048, {
Expand Down
2 changes: 1 addition & 1 deletion lib/helpers/initialize_keystore.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { strict: assert } = require('assert');

const { JWKS } = require('@panva/jose');
const { JWKS } = require('jose');
const isEqual = require('lodash/isEqual');

const { DEV_KEYSTORE } = require('../consts');
Expand Down
2 changes: 1 addition & 1 deletion lib/helpers/jwt.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { strict: assert } = require('assert');

const { JWE, JWKS, JWS } = require('@panva/jose');
const { JWE, JWKS, JWS } = require('jose');

function isKeyStore(obj) {
return obj instanceof JWKS.KeyStore;
Expand Down
2 changes: 1 addition & 1 deletion lib/helpers/oidc_context.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const omitBy = require('lodash/omitBy');
const get = require('lodash/get');
const isUndefined = require('lodash/isUndefined');
const debug = require('debug')('oidc-provider:bearer');
const { JWT, JWK, errors } = require('@panva/jose');
const { JWT, JWK, errors } = require('jose');

const ctxRef = require('../models/ctx_ref');
const Cookies = require('../cookies');
Expand Down
2 changes: 1 addition & 1 deletion lib/models/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const isPlainObject = require('lodash/isPlainObject');
const mapKeys = require('lodash/mapKeys');
const pick = require('lodash/pick');
const snakeCase = require('lodash/snakeCase');
const jose = require('@panva/jose');
const jose = require('jose');
const LRU = require('lru-cache');

const runtimeSupport = require('../helpers/runtime_support');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
},
"dependencies": {
"@koa/cors": "^3.0.0",
"@panva/jose": "^1.9.2",
"@types/koa": "^2.0.50",
"@types/node": "^12.7.8",
"debug": "^4.1.1",
"ejs": "^2.7.1",
"got": "^9.6.0",
"jose": "^1.10.0",
"jsesc": "^2.5.2",
"keygrip": "^1.1.0",
"koa": "^2.8.2",
Expand Down
2 changes: 1 addition & 1 deletion test/client_auth/client_auth.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { readFileSync } = require('fs');

const nock = require('nock');
const jose = require('@panva/jose');
const jose = require('jose');
const sinon = require('sinon');
const { expect } = require('chai');
const cloneDeep = require('lodash/cloneDeep');
Expand Down
2 changes: 1 addition & 1 deletion test/configuration/client_keystore.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { strict: assert } = require('assert');

const jose = require('@panva/jose');
const jose = require('jose');
const moment = require('moment');
const nock = require('nock');
const sinon = require('sinon');
Expand Down
2 changes: 1 addition & 1 deletion test/configuration/keystore_configuration.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-new */

const jose = require('@panva/jose');
const jose = require('jose');
const { expect } = require('chai');

const { Provider } = require('../../lib');
Expand Down
2 changes: 1 addition & 1 deletion test/configuration/omit_algs.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { expect } = require('chai');
const jose = require('@panva/jose');
const jose = require('jose');

const { Provider } = require('../../lib');

Expand Down
2 changes: 1 addition & 1 deletion test/dpop/dpop.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const url = require('url');

const sinon = require('sinon');
const { expect } = require('chai');
const { JWK, JWT } = require('@panva/jose');
const { JWK, JWT } = require('jose');

const nanoid = require('../../lib/helpers/nanoid');
const epochTime = require('../../lib/helpers/epoch_time');
Expand Down
2 changes: 1 addition & 1 deletion test/encryption/encryption.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const cloneDeep = require('lodash/cloneDeep');
const pull = require('lodash/pull');
const jose = require('@panva/jose');
const jose = require('jose');

const config = cloneDeep(require('../default.config'));

Expand Down
2 changes: 1 addition & 1 deletion test/encryption/encryption.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const url = require('url');
const { expect } = require('chai');
const base64url = require('base64url');
const sinon = require('sinon');
const jose = require('@panva/jose');
const jose = require('jose');

const bootstrap = require('../test_helper');
const JWT = require('../../lib/helpers/jwt');
Expand Down
2 changes: 1 addition & 1 deletion test/jwt/jsonwebtoken.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { AssertionError } = require('assert');

const { expect } = require('chai');
const jose = require('@panva/jose');
const jose = require('jose');

const JWT = require('../../lib/helpers/jwt');
const epochTime = require('../../lib/helpers/epoch_time');
Expand Down
2 changes: 1 addition & 1 deletion test/request/jwt_request.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { parse } = require('url');

const jose = require('@panva/jose');
const jose = require('jose');
const sinon = require('sinon');
const { expect } = require('chai');

Expand Down
2 changes: 1 addition & 1 deletion test/request/uri_request.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { parse } = require('url');

const jose = require('@panva/jose');
const jose = require('jose');
const sinon = require('sinon');
const nock = require('nock');
const { expect } = require('chai');
Expand Down
2 changes: 1 addition & 1 deletion test/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ console.warn = function (...args) {

async function run() {
clearRequireCache();
const jose = require('@panva/jose'); // eslint-disable-line global-require
const jose = require('jose'); // eslint-disable-line global-require
global.keystore = new jose.JWKS.KeyStore();
await Promise.all([
global.keystore.generate('RSA', 2048),
Expand Down
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as https from 'https';
import * as net from 'net';
import * as tls from 'tls';

import * as jose from '@panva/jose';
import * as jose from 'jose';
import * as Koa from 'koa';

export {};
Expand Down

0 comments on commit ee17022

Please sign in to comment.