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

Check if Exp and Nbf values exist. #1582

Merged
merged 1 commit into from
Jan 21, 2021
Merged

Check if Exp and Nbf values exist. #1582

merged 1 commit into from
Jan 21, 2021

Conversation

RojaEnnam
Copy link
Contributor

@RojaEnnam RojaEnnam commented Jan 20, 2021

  1. Instead of using JsonWebToken.Validto/ValidFrom in payload validation, adding logic to check for the presence of 'exp' and 'nbf' values in the token and returning the value accordingly. This means DateTime.MinValue will not be returned if these claims are absent.
  2. Adding tests to verify if it throws when 'exp' claim is not present.

@RojaEnnam RojaEnnam linked an issue Jan 20, 2021 that may be closed by this pull request
@RojaEnnam RojaEnnam force-pushed the roennam/LifeTimeValues branch from 5dd11d2 to 7674618 Compare January 20, 2021 23:15
@RojaEnnam RojaEnnam marked this pull request as ready for review January 20, 2021 23:16
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@keegan-caruso keegan-caruso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RojaEnnam RojaEnnam merged commit 4d000b6 into dev Jan 21, 2021
This was referenced Mar 16, 2021
This was referenced Mar 16, 2021
@brentschmaltz brentschmaltz deleted the roennam/LifeTimeValues branch April 3, 2023 18:00
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.

Invalid validation of non-present expiration JWT claims
3 participants