Skip to content

Chore: [AEA-6097] - Use the non-mock token endpoint for int JWT access#664

Open
wildjames wants to merge 12 commits intomainfrom
aea-6097-use-non-mock-url-in-int
Open

Chore: [AEA-6097] - Use the non-mock token endpoint for int JWT access#664
wildjames wants to merge 12 commits intomainfrom
aea-6097-use-non-mock-url-in-int

Conversation

@wildjames
Copy link
Copy Markdown
Contributor

@wildjames wildjames commented Mar 11, 2026

Summary

  • 🤖 Operational or Infrastructure Change

Details

The JWT exchange was using the path /oauth2-mock/token, but in int it should be using /oauth2.

I've updated the logic to switch that in the get_auth function. 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.

@github-actions
Copy link
Copy Markdown
Contributor

This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket:

AEA-6097

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-JWT in int/ref to use https://{env}.api.service.nhs.uk/oauth2 instead 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>
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants