mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 12:27:28 +00:00
feat: add identityName to audit log event and enhance identity token response structure
This commit is contained in:
@@ -1034,6 +1034,7 @@ interface GetTokenIdentityTokenAuthEvent {
|
|||||||
type: EventType.GET_TOKEN_IDENTITY_TOKEN_AUTH;
|
type: EventType.GET_TOKEN_IDENTITY_TOKEN_AUTH;
|
||||||
metadata: {
|
metadata: {
|
||||||
identityId: string;
|
identityId: string;
|
||||||
|
identityName: string;
|
||||||
tokenId: string;
|
tokenId: string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -312,6 +312,9 @@ export const registerIdentityTokenAuthRouter = async (server: FastifyZodProvider
|
|||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
accessToken: z.string(),
|
accessToken: z.string(),
|
||||||
|
expiresIn: z.coerce.number(),
|
||||||
|
accessTokenMaxTTL: z.coerce.number(),
|
||||||
|
tokenType: z.literal("Bearer"),
|
||||||
tokenData: IdentityAccessTokensSchema
|
tokenData: IdentityAccessTokensSchema
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -342,6 +345,9 @@ export const registerIdentityTokenAuthRouter = async (server: FastifyZodProvider
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
accessToken,
|
accessToken,
|
||||||
|
tokenType: "Bearer" as const,
|
||||||
|
expiresIn: identityTokenAuth.accessTokenTTL,
|
||||||
|
accessTokenMaxTTL: identityTokenAuth.accessTokenMaxTTL,
|
||||||
tokenData: identityAccessToken
|
tokenData: identityAccessToken
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -446,6 +452,7 @@ export const registerIdentityTokenAuthRouter = async (server: FastifyZodProvider
|
|||||||
type: EventType.GET_TOKEN_IDENTITY_TOKEN_AUTH,
|
type: EventType.GET_TOKEN_IDENTITY_TOKEN_AUTH,
|
||||||
metadata: {
|
metadata: {
|
||||||
identityId: token.identityId,
|
identityId: token.identityId,
|
||||||
|
identityName: identityMembershipOrg.identity.name,
|
||||||
tokenId: token.id
|
tokenId: token.id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user