diff --git a/backend/src/ee/services/audit-log/audit-log-types.ts b/backend/src/ee/services/audit-log/audit-log-types.ts index 021da107f..06fdeebcf 100644 --- a/backend/src/ee/services/audit-log/audit-log-types.ts +++ b/backend/src/ee/services/audit-log/audit-log-types.ts @@ -1034,6 +1034,7 @@ interface GetTokenIdentityTokenAuthEvent { type: EventType.GET_TOKEN_IDENTITY_TOKEN_AUTH; metadata: { identityId: string; + identityName: string; tokenId: string; }; } diff --git a/backend/src/server/routes/v1/identity-token-auth-router.ts b/backend/src/server/routes/v1/identity-token-auth-router.ts index 9906b6b5d..d7cd86330 100644 --- a/backend/src/server/routes/v1/identity-token-auth-router.ts +++ b/backend/src/server/routes/v1/identity-token-auth-router.ts @@ -312,6 +312,9 @@ export const registerIdentityTokenAuthRouter = async (server: FastifyZodProvider response: { 200: z.object({ accessToken: z.string(), + expiresIn: z.coerce.number(), + accessTokenMaxTTL: z.coerce.number(), + tokenType: z.literal("Bearer"), tokenData: IdentityAccessTokensSchema }) } @@ -342,6 +345,9 @@ export const registerIdentityTokenAuthRouter = async (server: FastifyZodProvider return { accessToken, + tokenType: "Bearer" as const, + expiresIn: identityTokenAuth.accessTokenTTL, + accessTokenMaxTTL: identityTokenAuth.accessTokenMaxTTL, tokenData: identityAccessToken }; } @@ -446,6 +452,7 @@ export const registerIdentityTokenAuthRouter = async (server: FastifyZodProvider type: EventType.GET_TOKEN_IDENTITY_TOKEN_AUTH, metadata: { identityId: token.identityId, + identityName: identityMembershipOrg.identity.name, tokenId: token.id } }