IBX-8482: Fixed lack of JWT stateless calls recognition #112
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.



Related PRs:
Description:
I made an oversight assuming one matcher in the reworked JWT authorization is enough for REST API calls recognition... Generating token is one thing needed to have access to the system. Due to stateless character of the calls we need to have a way to extract the token from
Authorization Bearerheader and make sure that user is the one it pretends to be.To properly identify incoming requests we need to have a separate request matcher which kicks in only when generating token is requested. The previous
AuthorizationHeaderRESTRequestMatcheris slightly adjusted to be triggered only when token is part of the request (which is basically the scenario when we try to do things using JWT basically).Apart from that, I got rid of setting current user reference as this is obsolete after introducing https://github.com/ibexa/core/pull/375/files#diff-0dd9db794c39fefaeb57b5ded4ef4abc15abdf43770f3debf769a3b0eeeb8f65.
For QA:
Documentation:
Another changes to the recipes and their origins need to be taken into account.