mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix(deps): update dependency jose to v4
* fix(deps): update dependency jose to v4 * fix(deps): Update code using jose v4 Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Joachim Van Herwegen <joachimvh@gmail.com>
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention, import/no-unresolved, tsdoc/syntax */
|
||||
/* eslint-disable @typescript-eslint/naming-convention, tsdoc/syntax */
|
||||
// import/no-unresolved can't handle jose imports
|
||||
// tsdoc/syntax can't handle {json} parameter
|
||||
import { randomBytes } from 'crypto';
|
||||
import type { JWK } from 'jose/jwk/from_key_like';
|
||||
import { fromKeyLike } from 'jose/jwk/from_key_like';
|
||||
import { generateKeyPair } from 'jose/util/generate_key_pair';
|
||||
import type { JWK } from 'jose';
|
||||
import { exportJWK, generateKeyPair } from 'jose';
|
||||
import type { AnyObject,
|
||||
CanBePromise,
|
||||
KoaContextWithOIDC,
|
||||
@@ -148,7 +147,7 @@ export class IdentityProviderFactory implements ProviderFactory {
|
||||
}
|
||||
// If they are not, generate and save them
|
||||
const { privateKey } = await generateKeyPair('RS256');
|
||||
const jwk = await fromKeyLike(privateKey);
|
||||
const jwk = await exportJWK(privateKey);
|
||||
// Required for Solid authn client
|
||||
jwk.alg = 'RS256';
|
||||
// In node v15.12.0 the JWKS does not get accepted because the JWK is not a plain object,
|
||||
|
||||
Reference in New Issue
Block a user