mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-18 10:48:36 +00:00
Complete v1 support for API key auth mode
This commit is contained in:
@@ -7,6 +7,14 @@ import {
|
||||
import { body } from 'express-validator';
|
||||
import { apiKeyDataController } from '../../controllers/v2';
|
||||
|
||||
router.get(
|
||||
'/',
|
||||
requireAuth({
|
||||
acceptedAuthModes: ['jwt']
|
||||
}),
|
||||
apiKeyDataController.getAPIKeyData
|
||||
);
|
||||
|
||||
router.post(
|
||||
'/',
|
||||
requireAuth({
|
||||
@@ -15,7 +23,7 @@ router.post(
|
||||
body('name').exists().trim(),
|
||||
body('expiresIn'), // measured in ms
|
||||
validateRequest,
|
||||
apiKeyDataController.createAPIKey
|
||||
apiKeyDataController.createAPIKeyData
|
||||
);
|
||||
|
||||
export default router;
|
||||
@@ -71,5 +71,4 @@ router.get(
|
||||
workspaceController.getWorkspaceServiceTokenData
|
||||
);
|
||||
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user