Merge branch 'beta' into main
This commit is contained in:
30
package.json
30
package.json
@@ -67,7 +67,7 @@
|
|||||||
"build": "directus-extension build",
|
"build": "directus-extension build",
|
||||||
"dev": "directus-extension build -w --no-minify",
|
"dev": "directus-extension build -w --no-minify",
|
||||||
"link": "directus-extension link",
|
"link": "directus-extension link",
|
||||||
"directus": "directus start",
|
"directus": "npx directus start",
|
||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
"test:coverage": "vitest run --coverage"
|
"test:coverage": "vitest run --coverage"
|
||||||
@@ -95,16 +95,16 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@directus/errors": "^0.0.2",
|
"@directus/errors": "^0.0.2",
|
||||||
"@directus/extensions-sdk": "^10.1.0",
|
"@directus/extensions-sdk": "^10.1.9",
|
||||||
"@directus/tsconfig": "^1.0.0",
|
"@directus/tsconfig": "^1.0.0",
|
||||||
"@directus/types": "^10.1.3",
|
"@directus/types": "^10.1.5",
|
||||||
"@directus/utils": "^10.0.8",
|
"@directus/utils": "^10.0.9",
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
||||||
"@semantic-release/changelog": "^6.0.3",
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
"@semantic-release/commit-analyzer": "^10.0.1",
|
"@semantic-release/commit-analyzer": "^10.0.4",
|
||||||
"@semantic-release/exec": "^6.0.3",
|
"@semantic-release/exec": "^6.0.3",
|
||||||
"@semantic-release/github": "^9.0.4",
|
"@semantic-release/github": "^9.0.4",
|
||||||
"@semantic-release/npm": "^10.0.4",
|
"@semantic-release/npm": "^10.0.5",
|
||||||
"@types/chai": "^4.3.5",
|
"@types/chai": "^4.3.5",
|
||||||
"@types/chai-as-promised": "^7.1.5",
|
"@types/chai-as-promised": "^7.1.5",
|
||||||
"@types/config": "^3.3.0",
|
"@types/config": "^3.3.0",
|
||||||
@@ -115,29 +115,29 @@
|
|||||||
"@types/jsonwebtoken": "^9.0.2",
|
"@types/jsonwebtoken": "^9.0.2",
|
||||||
"@types/lodash-es": "^4.17.8",
|
"@types/lodash-es": "^4.17.8",
|
||||||
"@types/mocha": "^10.0.1",
|
"@types/mocha": "^10.0.1",
|
||||||
"@types/node": "^20.4.5",
|
"@types/node": "^20.5.7",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.52.0",
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
||||||
"@vitest/coverage-istanbul": "^0.34.1",
|
"@vitest/coverage-istanbul": "^0.34.3",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.5.0",
|
||||||
"config": "^3.3.9",
|
"config": "^3.3.9",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"eslint": "^8.0.1",
|
"eslint": "^8.48.0",
|
||||||
"eslint-config-standard-with-typescript": "^37.0.0",
|
"eslint-config-standard-with-typescript": "^37.0.0",
|
||||||
"eslint-plugin-import": "^2.25.2",
|
"eslint-plugin-import": "^2.25.2",
|
||||||
"eslint-plugin-n": "^15.0.0",
|
"eslint-plugin-n": "^15.0.0",
|
||||||
"eslint-plugin-no-loops": "^0.3.0",
|
"eslint-plugin-no-loops": "^0.3.0",
|
||||||
"eslint-plugin-promise": "^6.0.0",
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
"fs-extra": "^11.1.1",
|
"fs-extra": "^11.1.1",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"knex": "^2.5.1",
|
"knex": "^2.5.1",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"nyc": "^15.1.0",
|
"nyc": "^15.1.0",
|
||||||
"semantic-release": "^21.0.7",
|
"semantic-release": "^21.1.1",
|
||||||
"sqlite3": "^5.1.6",
|
"sqlite3": "^5.1.6",
|
||||||
"ts-mocha": "^10.0.0",
|
"ts-mocha": "^10.0.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.2.2",
|
||||||
"vitest": "^0.34.1"
|
"vitest": "^0.34.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@keyv/redis": "^2.7.0",
|
"@keyv/redis": "^2.7.0",
|
||||||
|
|||||||
2667
pnpm-lock.yaml
generated
2667
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,7 @@ import { createError } from '@directus/errors';
|
|||||||
|
|
||||||
const InvalidJWKIssuerMetadata = createError('INVALID_JWKS_ISSUER_ERROR', 'No JWKS_URL or JWKS_KEYS and could not discover JWKS_URL from openid metadata', 500);
|
const InvalidJWKIssuerMetadata = createError('INVALID_JWKS_ISSUER_ERROR', 'No JWKS_URL or JWKS_KEYS and could not discover JWKS_URL from openid metadata', 500);
|
||||||
const InvalidJWKSUrl = createError('INVALID_JWKS_ISSUER_ERROR', 'Could not retrieve any valid keys from JWKS_URL', 500);
|
const InvalidJWKSUrl = createError('INVALID_JWKS_ISSUER_ERROR', 'Could not retrieve any valid keys from JWKS_URL', 500);
|
||||||
|
const InvalidJWKKeys = createError('INVALID_JWKS_ISSUER_ERROR', 'No signing keys in response from provider')
|
||||||
|
|
||||||
|
|
||||||
export interface AuthProvider {
|
export interface AuthProvider {
|
||||||
@@ -130,7 +131,7 @@ async function getJWKSClient(url: string) {
|
|||||||
try {
|
try {
|
||||||
const keys = await jwksClient.getSigningKeys()
|
const keys = await jwksClient.getSigningKeys()
|
||||||
if (keys.length == 0) {
|
if (keys.length == 0) {
|
||||||
throw new InvalidJWKSUrl();
|
throw new InvalidJWKKeys();
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new InvalidJWKSUrl();
|
throw new InvalidJWKSUrl();
|
||||||
|
|||||||
45528
test/hooks/directus-extension-external-jwt/index.js
Normal file
45528
test/hooks/directus-extension-external-jwt/index.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user