Skip to content

Comments

CODE RUB: Foundation Service NHS Login#187

Merged
cjdutoit merged 10 commits intomainfrom
users/davidhayes03/foundation-idecide
Jan 27, 2026
Merged

CODE RUB: Foundation Service NHS Login#187
cjdutoit merged 10 commits intomainfrom
users/davidhayes03/foundation-idecide

Conversation

@davidhayes03
Copy link
Contributor

@davidhayes03 davidhayes03 commented Jan 26, 2026

CLOSES AB#27342

…nIsNullAndLogItAsync -> PASS

ShouldThrowNhsLoginServiceDependencyValidationExceptionOnNhsLoginAsyncIfUserInfoIsNullAndLogItAsync -> PASS
ShouldThrowServiceExceptionOnNhsLoginAsyncIfServiceErrorOccurredAndLogItAsync -> PASS
Copilot AI review requested due to automatic review settings January 26, 2026 15:06
@github-actions github-actions bot added the CODE RUB The code rub category is for small changes (not for bug fixes) label Jan 26, 2026
Copy link
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

This PR implements NHS Login integration for the Foundation Service, adding OpenID Connect authentication flow and user information retrieval capabilities.

Changes:

  • Added NHS Login service layer with validation, exception handling, and user info retrieval
  • Integrated NHS Login endpoints into the client application with proxy configuration
  • Created UI components for NHS Login opt-out page displaying patient information

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
vite.config.ts Added proxy routes for NHS Login endpoints (/login, /signin-oidc, /token, /logout, /patientinfo)
nhsLoginOptOutPage.tsx New page component to display patient information from NHS Login
home.tsx Added test button for NHS Login flow
App.tsx Registered NHS Login opt-out page route
NhsLoginService.cs Implemented NHS Login service with access token retrieval and user info fetching
NhsLoginService.Validations.cs Added validation logic for access tokens and user info responses
NhsLoginService.Exceptions.cs Implemented comprehensive exception handling with TryCatch pattern
NullNhsLoginException.cs New exception for null access token scenarios
NhsLoginUserInfoException.cs New exception for failed user info retrieval
SecurityBroker.cs Added methods to retrieve NHS Login access tokens and fetch user info from OIDC endpoint
ISecurityBroker.cs Added interface methods for NHS Login operations
NhsLoginServiceTests.cs Test fixture setup with helper methods for NHS Login service tests
NhsLoginServiceTests.Validations.NhsLoginAsync.cs Validation tests for null access token and user info scenarios
NhsLoginServiceTests.NhsLoginAsync.Logic.cs Logic test verifying successful NHS Login flow
NhsLoginServiceTests.NhsLoginAsync.Exceptions.cs Exception handling test for service errors

@davidhayes03 davidhayes03 requested a review from cjdutoit January 26, 2026 15:22
Copilot AI review requested due to automatic review settings January 26, 2026 15:43
Copy link
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 15 out of 15 changed files in this pull request and generated 12 comments.

Copilot AI review requested due to automatic review settings January 27, 2026 13:24
Copy link
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 18 out of 18 changed files in this pull request and generated 4 comments.

cjdutoit
cjdutoit previously approved these changes Jan 27, 2026
Copilot AI review requested due to automatic review settings January 27, 2026 14:37
Copy link
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 18 out of 18 changed files in this pull request and generated 1 comment.

@cjdutoit cjdutoit merged commit cd1638b into main Jan 27, 2026
5 checks passed
@cjdutoit cjdutoit deleted the users/davidhayes03/foundation-idecide branch January 27, 2026 14:50
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.

2 participants