-
Notifications
You must be signed in to change notification settings - Fork 22
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
[#171800318] preValidate with acceptedClockSkewMs #29
Conversation
Codecov Report
@@ Coverage Diff @@
## master #29 +/- ##
==========================================
- Coverage 66.08% 65.32% -0.76%
==========================================
Files 10 10
Lines 690 698 +8
Branches 104 103 -1
==========================================
Hits 456 456
- Misses 233 241 +8
Partials 1 1
Continue to review full report at Codecov.
|
@@ -554,7 +554,11 @@ const mainAttributeValidation = ( | |||
.chain(IssueInstant => utcStringToDate(IssueInstant, "IssueInstant")) | |||
.chain( | |||
fromPredicate( | |||
_ => !hasStrictValidation || _.getTime() < Date.now(), | |||
_ => | |||
_.getTime() < |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move this computation at caller level (at the same level of hasStrictValidation) so we can reuse it seamlessy between inner methods ? ie.
const acceptedClockSkewMs = (samlConfig.acceptedClockSkewMs || 0) === -1
? Infinity
: Date.now() + samlConfig.acceptedClockSkewMs);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In two cases the value is Infinity
(NotBefore and IssueInstant) and on another case is -Infinity
(NotOnOrAfter). How we can handle these scenarios?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I didn't see this, it's ok as is then
Co-Authored-By: Danilo Spinelli <gunzip@users.noreply.github.com>
Co-Authored-By: Danilo Spinelli <gunzip@users.noreply.github.com>
No description provided.