0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00

fix(deps): update dependency jose to v4 (#646)

* fix(deps): update dependency jose to v4

* fix(deps): update jose usage

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Gao Sun <gao@silverhand.io>
This commit is contained in:
renovate[bot] 2022-04-24 13:55:47 +08:00 committed by GitHub
parent ac3f9ced58
commit 88e58b8b0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 18 deletions

View file

@ -30,7 +30,7 @@
"i18next": "^21.0.0", "i18next": "^21.0.0",
"iconv-lite": "0.6.3", "iconv-lite": "0.6.3",
"inquirer": "^8.2.2", "inquirer": "^8.2.2",
"jose": "^3.14.3", "jose": "^4.0.0",
"koa": "^2.13.1", "koa": "^2.13.1",
"koa-body": "^5.0.0", "koa-body": "^5.0.0",
"koa-logger": "^3.2.1", "koa-logger": "^3.2.1",

View file

@ -1,4 +1,4 @@
import { jwtVerify } from 'jose/jwt/verify'; import { jwtVerify } from 'jose';
import { Context } from 'koa'; import { Context } from 'koa';
import { IRouterParamContext } from 'koa-router'; import { IRouterParamContext } from 'koa-router';
@ -8,7 +8,7 @@ import { createContextWithRouteParameters } from '@/utils/test-utils';
import koaAuth, { WithAuthContext } from './koa-auth'; import koaAuth, { WithAuthContext } from './koa-auth';
jest.mock('jose/jwt/verify', () => ({ jest.mock('jose', () => ({
jwtVerify: jest.fn(() => ({ payload: { sub: 'fooUser' } })), jwtVerify: jest.fn(() => ({ payload: { sub: 'fooUser' } })),
})); }));

View file

@ -1,6 +1,6 @@
import { IncomingHttpHeaders } from 'http'; import { IncomingHttpHeaders } from 'http';
import { jwtVerify } from 'jose/jwt/verify'; import { jwtVerify } from 'jose';
import { MiddlewareType, Request } from 'koa'; import { MiddlewareType, Request } from 'koa';
import { IRouterParamContext } from 'koa-router'; import { IRouterParamContext } from 'koa-router';

View file

@ -1,7 +1,7 @@
/* istanbul ignore file */ /* istanbul ignore file */
import { CustomClientMetadataKey } from '@logto/schemas'; import { CustomClientMetadataKey } from '@logto/schemas';
import { fromKeyLike } from 'jose/jwk/from_key_like'; import { exportJWK } from 'jose';
import Koa from 'koa'; import Koa from 'koa';
import mount from 'koa-mount'; import mount from 'koa-mount';
import { Provider, errors } from 'oidc-provider'; import { Provider, errors } from 'oidc-provider';
@ -16,7 +16,7 @@ import { routes } from '@/routes/consts';
export default async function initOidc(app: Koa): Promise<Provider> { export default async function initOidc(app: Koa): Promise<Provider> {
const { issuer, privateKey, defaultIdTokenTtl, defaultRefreshTokenTtl } = envSet.values.oidc; const { issuer, privateKey, defaultIdTokenTtl, defaultRefreshTokenTtl } = envSet.values.oidc;
const keys = [await fromKeyLike(privateKey)]; const keys = [await exportJWK(privateKey)];
const cookieConfig = Object.freeze({ const cookieConfig = Object.freeze({
sameSite: 'lax', sameSite: 'lax',
path: '/', path: '/',

15
pnpm-lock.yaml generated
View file

@ -184,7 +184,7 @@ importers:
inquirer: ^8.2.2 inquirer: ^8.2.2
jest: ^27.5.1 jest: ^27.5.1
jest-matcher-specific-error: ^1.0.0 jest-matcher-specific-error: ^1.0.0
jose: ^3.14.3 jose: ^4.0.0
koa: ^2.13.1 koa: ^2.13.1
koa-body: ^5.0.0 koa-body: ^5.0.0
koa-logger: ^3.2.1 koa-logger: ^3.2.1
@ -222,7 +222,7 @@ importers:
i18next: 21.6.12 i18next: 21.6.12
iconv-lite: 0.6.3 iconv-lite: 0.6.3
inquirer: 8.2.2 inquirer: 8.2.2
jose: 3.20.3 jose: 4.6.0
koa: 2.13.4 koa: 2.13.4
koa-body: 5.0.0 koa-body: 5.0.0
koa-logger: 3.2.1 koa-logger: 3.2.1
@ -12205,17 +12205,8 @@ packages:
'@sideway/pinpoint': 2.0.0 '@sideway/pinpoint': 2.0.0
dev: true dev: true
/jose/3.20.3:
resolution: {integrity: sha512-Z4a5Nl4pmGivdSgaq+a5EbNjrvSO4vtBTmVy5C3HNxWfJ92aG8DTNZrQywowxyOlSqdX/BmCPAy/ieElXDM3pw==}
dev: false
/jose/4.3.7:
resolution: {integrity: sha512-S7Xfsy8nN9Iw/AZxk+ZxEbd5ImIwJPM0TfAo8zI8FF+3lidQ2yiK4dqzsaPKSbZD0woNVSY0KCql6rlKc5V7ug==}
dev: false
/jose/4.6.0: /jose/4.6.0:
resolution: {integrity: sha512-0hNAkhMBNi4soKSAX4zYOFV+aqJlEz/4j4fregvasJzEVtjDChvWqRjPvHwLqr5hx28Ayr6bsOs1Kuj87V0O8w==} resolution: {integrity: sha512-0hNAkhMBNi4soKSAX4zYOFV+aqJlEz/4j4fregvasJzEVtjDChvWqRjPvHwLqr5hx28Ayr6bsOs1Kuj87V0O8w==}
dev: true
/js-base64/3.7.2: /js-base64/3.7.2:
resolution: {integrity: sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ==} resolution: {integrity: sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ==}
@ -14299,7 +14290,7 @@ packages:
debug: 4.3.3 debug: 4.3.3
ejs: 3.1.6 ejs: 3.1.6
got: 11.8.3 got: 11.8.3
jose: 4.3.7 jose: 4.6.0
jsesc: 3.0.2 jsesc: 3.0.2
koa: 2.13.4 koa: 2.13.4
koa-compose: 4.1.0 koa-compose: 4.1.0