fix: upgrade packages to version 10.2.2
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import type { Accountability } from '@directus/types';
|
||||
import { getAuthProviders } from './authProvider/get-auth-providers.js';
|
||||
import type { Knex } from 'knex';
|
||||
|
||||
import { verify_token } from './verify-token.js';
|
||||
import { CacheEnabled, CacheGet, CacheSet } from './cache.js';
|
||||
|
||||
import type { Knex } from 'knex';
|
||||
|
||||
|
||||
const authProviders = await getAuthProviders();
|
||||
|
||||
@@ -2,15 +2,14 @@ import { defineHook } from '@directus/extensions-sdk';
|
||||
import { getAccountabilityForToken } from './external-jwt/get-accountability-for-token';
|
||||
import type { Request } from 'express';
|
||||
import jwt from 'jsonwebtoken';
|
||||
import { HookConfig } from '@directus/types';
|
||||
|
||||
|
||||
import type {HookConfig} from '@directus/extensions'
|
||||
import type { Accountability, EventContext } from '@directus/types';
|
||||
|
||||
export default defineHook<HookConfig>(({ filter }) => {
|
||||
|
||||
// get all configuration
|
||||
|
||||
filter('authenticate', (defaultAccountability, event, context) => {
|
||||
filter('authenticate', (defaultAccountability: Accountability, event, context: EventContext) => {
|
||||
const req = <Request>event['req'];
|
||||
if(!req.token) return defaultAccountability;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user