Skip to content

Commit

Permalink
feat(cb2-10665): add roles to log event
Browse files Browse the repository at this point in the history
  • Loading branch information
LGin-BJSS committed Mar 21, 2024
1 parent c2fc02f commit 4619802
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ export const getValidJwt = async (authorizationToken: string, logEvent: ILogEven
}

logEvent.email = username;
logEvent.roles = (decoded.payload as JwtPayload).roles;
logEvent.tokenExpiry = new Date((payload.exp as number) * 1000).toISOString();

await checkSignature(authorizationToken, decoded, tenantId, clientId);

return decoded;
};

Expand Down

0 comments on commit 4619802

Please sign in to comment.