mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 13:26:16 +00:00
add org id to missing auth modes
This commit is contained in:
@@ -159,6 +159,7 @@ export const injectIdentity = fp(async (server: FastifyZodProvider) => {
|
|||||||
}
|
}
|
||||||
case AuthMode.SERVICE_TOKEN: {
|
case AuthMode.SERVICE_TOKEN: {
|
||||||
const serviceToken = await server.services.serviceToken.fnValidateServiceToken(token);
|
const serviceToken = await server.services.serviceToken.fnValidateServiceToken(token);
|
||||||
|
requestContext.set("orgId", serviceToken.orgId);
|
||||||
req.auth = {
|
req.auth = {
|
||||||
orgId: serviceToken.orgId,
|
orgId: serviceToken.orgId,
|
||||||
authMode: AuthMode.SERVICE_TOKEN as const,
|
authMode: AuthMode.SERVICE_TOKEN as const,
|
||||||
@@ -183,6 +184,7 @@ export const injectIdentity = fp(async (server: FastifyZodProvider) => {
|
|||||||
}
|
}
|
||||||
case AuthMode.SCIM_TOKEN: {
|
case AuthMode.SCIM_TOKEN: {
|
||||||
const { orgId, scimTokenId } = await server.services.scim.fnValidateScimToken(token);
|
const { orgId, scimTokenId } = await server.services.scim.fnValidateScimToken(token);
|
||||||
|
requestContext.set("orgId", orgId);
|
||||||
req.auth = { authMode: AuthMode.SCIM_TOKEN, actor, scimTokenId, orgId, authMethod: null };
|
req.auth = { authMode: AuthMode.SCIM_TOKEN, actor, scimTokenId, orgId, authMethod: null };
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user