mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 13:27:46 +00:00
Remove API key auth mode
This commit is contained in:
@@ -91,7 +91,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
200: z.void()
|
200: z.void()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.API_KEY]),
|
onRequest: verifyAuth([AuthMode.JWT]),
|
||||||
handler: async (req) => {
|
handler: async (req) => {
|
||||||
await server.services.project.upgradeProject({
|
await server.services.project.upgradeProject({
|
||||||
actorId: req.permission.id,
|
actorId: req.permission.id,
|
||||||
@@ -116,7 +116,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.API_KEY]),
|
onRequest: verifyAuth([AuthMode.JWT]),
|
||||||
handler: async (req) => {
|
handler: async (req) => {
|
||||||
const status = await server.services.project.getProjectUpgradeStatus({
|
const status = await server.services.project.getProjectUpgradeStatus({
|
||||||
projectId: req.params.projectId,
|
projectId: req.params.projectId,
|
||||||
@@ -155,7 +155,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.API_KEY, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
handler: async (req) => {
|
handler: async (req) => {
|
||||||
const project = await server.services.project.createProject({
|
const project = await server.services.project.createProject({
|
||||||
actorId: req.permission.id,
|
actorId: req.permission.id,
|
||||||
@@ -191,7 +191,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
200: ProjectsSchema
|
200: ProjectsSchema
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.API_KEY, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
|
|
||||||
handler: async (req) => {
|
handler: async (req) => {
|
||||||
const project = await server.services.project.deleteProject({
|
const project = await server.services.project.deleteProject({
|
||||||
@@ -218,7 +218,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
200: projectWithEnv
|
200: projectWithEnv
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.API_KEY, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
handler: async (req) => {
|
handler: async (req) => {
|
||||||
const project = await server.services.project.getAProject({
|
const project = await server.services.project.getAProject({
|
||||||
filter: req.params.slug,
|
filter: req.params.slug,
|
||||||
@@ -249,7 +249,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.API_KEY, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
handler: async (req) => {
|
handler: async (req) => {
|
||||||
const project = await server.services.project.updateProject({
|
const project = await server.services.project.updateProject({
|
||||||
filterType: ProjectFilterType.SLUG,
|
filterType: ProjectFilterType.SLUG,
|
||||||
|
|||||||
Reference in New Issue
Block a user