diff --git a/certification/fapi/index.js b/certification/fapi/index.js index ba40e1fcc..03ad660af 100644 --- a/certification/fapi/index.js +++ b/certification/fapi/index.js @@ -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'); diff --git a/docs/README.md b/docs/README.md index e2ff4e7df..a17d50061 100644 --- a/docs/README.md +++ b/docs/README.md @@ -571,7 +571,7 @@ _**recommendation**_: **Provider key rotation** - The following action order is
```js -const { JWKS: { KeyStore } } = require('@panva/jose'); +const { JWKS: { KeyStore } } = require('jose'); const keystore = new KeyStore(); keystore.generateSync('RSA', 2048, { alg: 'RS256', @@ -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, { diff --git a/example/README.md b/example/README.md index 886199b4e..137787a12 100644 --- a/example/README.md +++ b/example/README.md @@ -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 diff --git a/lib/helpers/defaults.js b/lib/helpers/defaults.js index ba895e51d..9439c2425 100644 --- a/lib/helpers/defaults.js +++ b/lib/helpers/defaults.js @@ -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', @@ -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, { diff --git a/lib/helpers/initialize_keystore.js b/lib/helpers/initialize_keystore.js index a102b6b2f..c6716329f 100644 --- a/lib/helpers/initialize_keystore.js +++ b/lib/helpers/initialize_keystore.js @@ -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'); diff --git a/lib/helpers/jwt.js b/lib/helpers/jwt.js index 7b5f547ed..79d3cae37 100644 --- a/lib/helpers/jwt.js +++ b/lib/helpers/jwt.js @@ -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; diff --git a/lib/helpers/oidc_context.js b/lib/helpers/oidc_context.js index 9561946bf..e618908de 100644 --- a/lib/helpers/oidc_context.js +++ b/lib/helpers/oidc_context.js @@ -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'); diff --git a/lib/models/client.js b/lib/models/client.js index 736aa275f..9cc882fd8 100644 --- a/lib/models/client.js +++ b/lib/models/client.js @@ -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'); diff --git a/package.json b/package.json index c743c1f22..e78eb3f04 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/client_auth/client_auth.test.js b/test/client_auth/client_auth.test.js index b570638e1..ed55b45d1 100644 --- a/test/client_auth/client_auth.test.js +++ b/test/client_auth/client_auth.test.js @@ -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'); diff --git a/test/configuration/client_keystore.test.js b/test/configuration/client_keystore.test.js index a173161de..fea2476fa 100644 --- a/test/configuration/client_keystore.test.js +++ b/test/configuration/client_keystore.test.js @@ -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'); diff --git a/test/configuration/keystore_configuration.test.js b/test/configuration/keystore_configuration.test.js index 28cb4a6a0..a37de06a0 100644 --- a/test/configuration/keystore_configuration.test.js +++ b/test/configuration/keystore_configuration.test.js @@ -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'); diff --git a/test/configuration/omit_algs.test.js b/test/configuration/omit_algs.test.js index 612c840f2..60c6fe01b 100644 --- a/test/configuration/omit_algs.test.js +++ b/test/configuration/omit_algs.test.js @@ -1,5 +1,5 @@ const { expect } = require('chai'); -const jose = require('@panva/jose'); +const jose = require('jose'); const { Provider } = require('../../lib'); diff --git a/test/dpop/dpop.test.js b/test/dpop/dpop.test.js index 1714d2892..6ea39c940 100644 --- a/test/dpop/dpop.test.js +++ b/test/dpop/dpop.test.js @@ -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'); diff --git a/test/encryption/encryption.config.js b/test/encryption/encryption.config.js index dae33c8d3..eda70ff64 100644 --- a/test/encryption/encryption.config.js +++ b/test/encryption/encryption.config.js @@ -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')); diff --git a/test/encryption/encryption.test.js b/test/encryption/encryption.test.js index 966e5d0c7..c5975706f 100644 --- a/test/encryption/encryption.test.js +++ b/test/encryption/encryption.test.js @@ -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'); diff --git a/test/jwt/jsonwebtoken.test.js b/test/jwt/jsonwebtoken.test.js index a3de76f10..911a1a247 100644 --- a/test/jwt/jsonwebtoken.test.js +++ b/test/jwt/jsonwebtoken.test.js @@ -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'); diff --git a/test/request/jwt_request.test.js b/test/request/jwt_request.test.js index a6f918b75..8fbf9ace4 100644 --- a/test/request/jwt_request.test.js +++ b/test/request/jwt_request.test.js @@ -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'); diff --git a/test/request/uri_request.test.js b/test/request/uri_request.test.js index 7849fdf22..d592182d5 100644 --- a/test/request/uri_request.test.js +++ b/test/request/uri_request.test.js @@ -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'); diff --git a/test/run.js b/test/run.js index d2c7a5762..a0c6170c4 100644 --- a/test/run.js +++ b/test/run.js @@ -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), diff --git a/types/index.d.ts b/types/index.d.ts index 230d1a719..4a94f2054 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -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 {};