Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FILEZCAD-2080] Providing option to override decrypt key #80

Merged
merged 10 commits into from
Feb 1, 2024

Conversation

qHedge
Copy link
Contributor

@qHedge qHedge commented Feb 1, 2024

To facilitate key rotations,

  • Added optional overrideDecryptKey to getIdTokenPayload
  • Added extractKidFromIdToken util function to extract the key id used for encryption

Sample usage

      // from JWE util
      const kid = extractKidFromIdToken(token);

      // get decryptKey based on the key of encryptKey used
      const decryptKey = await this.getDecryptKeyFromKid(kid);

      const tokenPayload = await this.corppassOidcHelper.getIdTokenPayload(token, decryptKey);

@Gyunikuchan Gyunikuchan merged commit 69c3b3e into GovTechSG:master Feb 1, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants