Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Endpoint improvements

Carlos Monastyrskic2db2a0bc744
diff --git a/backend/src/server/routes/v1/identity-router.ts b/backend/src/server/routes/v1/identity-router.ts
index 82ab826378..9acd515c46 100644
--- a/backend/src/server/routes/v1/identity-router.ts
+++ b/backend/src/server/routes/v1/identity-router.ts
@@ -488,17 +488,20 @@ export const registerIdentityRouter = async (server: FastifyZodProvider) => {
schema: {
response: {
200: z.object({
- id: z.string(),
- name: z.string(),
- slug: z.string(),
- role: z.string()
+ identityDetails: z.object({
+ organization: z.object({
+ id: z.string(),
+ name: z.string(),
+ slug: z.string()
+ })
+ })
})
}
},
onRequest: verifyAuth([AuthMode.IDENTITY_ACCESS_TOKEN], { requireOrg: false }),
handler: async (req) => {
const organization = await server.services.org.findIdentityOrganization(req.permission.id);
- return organization;
+ return { identityDetails: { organization } };
}
});
};