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
Add JTI validation #28
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tion::jsonSerialize() not having a return type.
- Change mixed tabs/spaces to spaces - Add trailing commas to arrays - Make method opening bracket consistent across methods - Remove trailing whitespaces - Add trailing newline to file
- Add missing return type - Remove unneeded doc-blocks - Add missing param in doc-block
- Rename tests to mention subject under test - Add separator comments between different method types - Move helper funtion to end of class
…abstract parent.
- Add various checks for unset keys - Change Exception message to state what makes a token invalid -
Potherca
force-pushed
the
feature/jti
branch
from
September 18, 2022 17:41
a74a590
to
8d2c826
Compare
Potherca
force-pushed
the
feature/jti
branch
from
September 18, 2022 19:19
3b20c4a
to
378abf0
Compare
3 tasks
In person review with @poef provided insights that changes the scope of the current implementation. Most notably:
|
…with other tests.
3 tasks
poef
approved these changes
Sep 23, 2022
…ead of string contents.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This MR adds a JTI Validator class, in order to validate
jti
.In order to do this, the
TokenGenerator
class needed to be changed, since theDateInterval
in that class also needs to be used byJtiValidator
.The DateInterval has been made constructor dependency for both the TokenGenerator and the JtiValidator.
To make this refactor safe, unit-tests have been added (see
tests/unit/TokenGeneratorTest.php
).The JtiValidator has been added as constructor dependency to the
Utils\DPop
class.Unit-tests were added here as well. During testing, some bug were found and fixed. These fixes will need to be approved by @poef (as lead in DPOP hardening) before this MR can be moved out of "WIP".
As more effort was invested in writing unit-test, the scope of this issue has not yet been completed.
What is still missing, before this MR can come out of WIP is: