Chore: [AEA-6097] - Use the non-mock token endpoint for int JWT access#664
Open
Chore: [AEA-6097] - Use the non-mock token endpoint for int JWT access#664
Conversation
Contributor
|
This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket: AEA-6097 |
…tal/electronic-prescription-service-api-regression-tests into aea-6097-use-non-mock-url-in-int
There was a problem hiding this comment.
Pull request overview
Updates the shared authentication helper to use the correct (non-mock) OAuth2 base path for EPS FHIR dispensing JWT token exchange in int (and ref), while preserving existing behavior for other products that still rely on /oauth2-mock.
Changes:
- Switch
EPS-FHIR-DISPENSING-JWTinint/refto usehttps://{env}.api.service.nhs.uk/oauth2instead of/oauth2-mock. - Add explanatory inline comments clarifying why the endpoint differs by environment/product.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jim Wild <wild.james343@gmail.com>
|
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
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.



Summary
Details
The JWT exchange was using the path
/oauth2-mock/token, but inintit should be using/oauth2.I've updated the logic to switch that in the
get_authfunction. However, since other projects (PSU) use JWT access and seem to be working fine, I've made it in such a way as to not alter their behaviour.