mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 11:38:55 +00:00
Substitute hardcoded auth modes for variables
This commit is contained in:
@@ -4,6 +4,7 @@ import { body } from 'express-validator';
|
||||
import { requireAuth, validateRequest } from '../../middleware';
|
||||
import { authController } from '../../controllers/v1';
|
||||
import { authLimiter } from '../../helpers/rateLimiter';
|
||||
import { AUTH_MODE_JWT } from '../../variables';
|
||||
|
||||
router.post('/token', validateRequest, authController.getNewToken);
|
||||
|
||||
@@ -29,7 +30,7 @@ router.post(
|
||||
'/logout',
|
||||
authLimiter,
|
||||
requireAuth({
|
||||
acceptedAuthModes: ['jwt']
|
||||
acceptedAuthModes: [AUTH_MODE_JWT]
|
||||
}),
|
||||
authController.logout
|
||||
);
|
||||
@@ -37,7 +38,7 @@ router.post(
|
||||
router.post(
|
||||
'/checkAuth',
|
||||
requireAuth({
|
||||
acceptedAuthModes: ['jwt']
|
||||
acceptedAuthModes: [AUTH_MODE_JWT]
|
||||
}),
|
||||
authController.checkAuth
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user