-
Notifications
You must be signed in to change notification settings - Fork 530
clean up use of session in Access APIs for SPA #11844
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
Open
stevenwinship
wants to merge
10
commits into
develop
Choose a base branch
from
11740-api-file-download-with-bearer-token
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or 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
I removed the code that compared the authUser and sessionUser to null since these calls no longer returned null, they returned guestUser if the user was not found |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
FY26 Sprint 4
FY26 Sprint 4 (2025-08-13 - 2025-08-27)
FY26 Sprint 5
FY26 Sprint 5 (2025-08-27 - 2025-09-10)
FY26 Sprint 6
FY26 Sprint 6 (2025-09-10 - 2025-09-24)
FY26 Sprint 8
FY26 Sprint 8 (2025-10-08 - 2025-10-22)
GREI Re-arch
Issues related to the GREI Dataverse rearchitecture
Original size: 50
Size: 10
A percentage of a sprint. 7 hours.
SPA.Q3.2025
Not related to any specific Q3 2025 feature
Type: Bug
a defect
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.
What this PR does / why we need it: We need to decouple the Access API from this responsibility, so that it validates permissions for the authenticated user provided by the API authentication filter—regardless of the authentication mechanism used. In the SPA’s case, this is a bearer token.
Must still be backward compatible with JSF so session is still needed but localized
The original issue also has a bug in that the api called is not being sent as bearer token.
Which issue(s) this PR closes:#11740
This fix doesn't close this issue until the frontend adds the bearer token to the api call
Special notes for your reviewer: Removed a lot of the code referencing the session. Some code was not being utilized as downstream code doesn't behave as it did when this older code was written. I tried to consolidate the code accessing the session to a single method.
Suggestions on how to test this: Once the frontend is fixed the UI can be used to test. Until then a curl to the endpoint with the Bearer token can be used. I tested by adding a log statement to display the bearer token (BearerTokenAuthMechanism) from the previous call to pass to this api call.
Does this PR introduce a user interface change? If mockups are available, please link/include them here: no
Is there a release notes update needed for this change?: included
Additional documentation: