Replace nanoid with crypto (#4769)
This commit is contained in:
Родитель
6ef82744a6
Коммит
d00038aeea
|
@ -19,8 +19,7 @@
|
|||
"@types/node-forge": "^1.3.11"
|
||||
},
|
||||
"dependencies": {
|
||||
"eslint-plugin-only-warn": "^1.1.0",
|
||||
"nanoid": "^3.3.7",
|
||||
"eslint-plugin-only-warn": "^1.1.0",
|
||||
"node-forge": "^1.3.1",
|
||||
"zod": "^3.23.8"
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import forge from 'node-forge';
|
|||
import jwt, { Algorithm } from 'jsonwebtoken'; // eslint-disable-line import/no-extraneous-dependencies
|
||||
import nock from 'nock'; // eslint-disable-line import/no-extraneous-dependencies
|
||||
import url from 'url';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { ok } from 'assert';
|
||||
import { randomUUID } from 'crypto';
|
||||
|
||||
/**
|
||||
* Registers mocha hooks for proper usage
|
||||
|
@ -62,10 +62,10 @@ export function stub(options: Partial<Options> = {}): Result {
|
|||
algorithm = 'RS256',
|
||||
bits = 2048,
|
||||
expiresIn = 1000 * 60 * 5,
|
||||
host = `https://${nanoid()}.jwt.localhost`,
|
||||
host = `https://${randomUUID()}.jwt.localhost`,
|
||||
issuer = 'iss',
|
||||
jwks = { path: '/v1/.well-known/jwks' },
|
||||
keyId = nanoid(),
|
||||
keyId = randomUUID(),
|
||||
metadata = { path: '/v1/.well-known/openid' },
|
||||
} = options;
|
||||
|
||||
|
|
|
@ -12010,11 +12010,6 @@ nanoid@^3.3.6:
|
|||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
|
||||
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
|
||||
|
||||
nanoid@^3.3.7:
|
||||
version "3.3.7"
|
||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
|
||||
integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==
|
||||
|
||||
napi-build-utils@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806"
|
||||
|
|
Загрузка…
Ссылка в новой задаче