mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 20:25:43 +00:00
Merge remote-tracking branch 'origin' into cleaning
This commit is contained in:
@@ -4,7 +4,8 @@ import { User, ServiceTokenData } from '../models';
|
||||
import {
|
||||
validateAuthMode,
|
||||
getAuthUserPayload,
|
||||
getAuthSTDPayload
|
||||
getAuthSTDPayload,
|
||||
getAuthAPIKeyPayload
|
||||
} from '../helpers/auth';
|
||||
import { BadRequestError } from '../utils/errors';
|
||||
|
||||
@@ -53,6 +54,11 @@ const requireAuth = ({
|
||||
authTokenValue: AUTH_TOKEN_VALUE
|
||||
});
|
||||
break;
|
||||
case 'apiKey':
|
||||
req.user = await getAuthAPIKeyPayload({
|
||||
authTokenValue: AUTH_TOKEN_VALUE
|
||||
});
|
||||
break;
|
||||
default:
|
||||
req.user = await getAuthUserPayload({
|
||||
authTokenValue: AUTH_TOKEN_VALUE
|
||||
|
||||
Reference in New Issue
Block a user