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

I-0: Add token expiration time validation, payload decode method, rem… #1

Merged
merged 1 commit into from
May 23, 2022

Conversation

ruthv1k
Copy link

@ruthv1k ruthv1k commented May 23, 2022

Changes

  • Added validation for registered claim "exp", if current UNIX timestamp is greater than the "exp" claim value from the token, InvalidTokenException must be thrown with the message "Token Expired"
  • Added decode method which decodes a base64 string into an array
  • Removed padding from header and payload base64 string while sigining the token (The padding has to be omitted as per https://tools.ietf.org/html/rfc7515#section-2)

…ove padding from header and payload base64 strings

- Added validation for registered claim "exp", if current unix timestamp is greater than the "exp" claim value from the token, InvalidTokenException must be thrown with the message "Token Expired"
- Added decode method which decodes a base64 string into an array
- Removed padding from header and payload base64 string while sigining the token (The padding has to be omitted as per https://tools.ietf.org/html/rfc7515#section-2)
@manu-kaushik manu-kaushik merged commit 35727ec into manu-kaushik:main May 23, 2022
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