Skip to content

CODE RUB: GetSessions Controller#223

Merged
davidhayes03 merged 3 commits into
mainfrom
user/davidhayes03/controller-session
Jun 8, 2026
Merged

CODE RUB: GetSessions Controller#223
davidhayes03 merged 3 commits into
mainfrom
user/davidhayes03/controller-session

Conversation

@davidhayes03
Copy link
Copy Markdown
Contributor

@davidhayes03 davidhayes03 commented May 6, 2026

CLOSES AB#28809

Copilot AI review requested due to automatic review settings May 6, 2026 11:10
@github-actions github-actions Bot added the CODE RUB The code rub category is for small changes (not for bug fixes) label May 6, 2026
Copy link
Copy Markdown
Contributor

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

Adds a new authenticated GET api/auth/session endpoint to surface current session/claim details and wires it through the NHS Digital API orchestration layer, with accompanying unit, integration, and acceptance test coverage.

Changes:

  • Added Session action to AuthController (authorized route) that validates NHS access token presence and returns selected user claims.
  • Exposed GetAccessTokenAsync via INhsDigitalApiOrchestrationService and implemented it in NhsDigitalApiOrchestrationService.
  • Added new unit/integration/acceptance tests and broker helpers for calling the new session endpoint.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
LondonDataServices.IDecide.Manage.Server/Controllers/AuthController.cs Adds the new GET session endpoint and returns claim-based session info.
LondonDataServices.IDecide.Manage.Server.Tests.Unit/Controllers/Auth/AuthControllerTests.Session.Logic.cs Adds unit tests for OK and Unauthorized scenarios for Session.
LondonDataServices.IDecide.Manage.Server.Tests.Unit/Controllers/Auth/AuthControllerTests.Session.Exceptions.cs Adds unit tests for exception-to-response mappings for Session.
LondonDataServices.IDecide.Manage.Server.Tests.Integration/Brokers/ApiBroker.Auth.cs Adds broker helper to call GET api/auth/session in integration tests.
LondonDataServices.IDecide.Manage.Server.Tests.Integration/Apis/Auth/AuthApiTests.Session.cs Adds a basic integration test for Session status code behavior.
LondonDataServices.IDecide.Manage.Server.Tests.Acceptance/Brokers/ApiBroker.Auth.cs Adds broker helper to call GET api/auth/session in acceptance tests.
LondonDataServices.IDecide.Manage.Server.Tests.Acceptance/Apis/Auth/AuthTests.Session.cs Adds acceptance tests for OK vs Unauthorized based on mocked access token.
LondonDataServices.IDecide.Core/Services/Orchestrations/NhsDigitalApis/NhsDigitalApiOrchestrationService.cs Adds orchestration method GetAccessTokenAsync delegating to foundation service with TryCatch.
LondonDataServices.IDecide.Core/Services/Orchestrations/NhsDigitalApis/INhsDigitalApiOrchestrationService.cs Extends orchestration interface with GetAccessTokenAsync.

Comment thread LondonDataServices.IDecide.Manage.Server/Controllers/AuthController.cs Outdated
Comment thread LondonDataServices.IDecide.Manage.Server/Controllers/AuthController.cs Outdated
Copilot AI review requested due to automatic review settings June 8, 2026 13:27
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

@davidhayes03 davidhayes03 merged commit 8aec47a into main Jun 8, 2026
10 checks passed
@davidhayes03 davidhayes03 deleted the user/davidhayes03/controller-session branch June 8, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CODE RUB The code rub category is for small changes (not for bug fixes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants