CODE RUB: Foundation Service NHS Login#187
Merged
Conversation
…nIsNullAndLogItAsync -> PASS ShouldThrowNhsLoginServiceDependencyValidationExceptionOnNhsLoginAsyncIfUserInfoIsNullAndLogItAsync -> PASS ShouldThrowServiceExceptionOnNhsLoginAsyncIfServiceErrorOccurredAndLogItAsync -> PASS
Contributor
There was a problem hiding this comment.
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 |
LondonDataServices.IDecide.Portal.Client/src/pages/nhsLoginOptOutPage.tsx
Show resolved
Hide resolved
LondonDataServices.IDecide.Core/Services/Foundations/NhsLogins/NhsLoginService.cs
Outdated
Show resolved
Hide resolved
LondonDataServices.IDecide.Portal.Client/src/pages/nhsLoginOptOutPage.tsx
Show resolved
Hide resolved
LondonDataServices.IDecide.Portal.Client/src/pages/nhsLoginOptOutPage.tsx
Show resolved
Hide resolved
LondonDataServices.IDecide.Core/Services/Foundations/NhsLogins/NhsLoginService.cs
Show resolved
Hide resolved
LondonDataServices.IDecide.Core/Services/Foundations/NhsLogins/NhsLoginService.cs
Show resolved
Hide resolved
LondonDataServices.IDecide.Core/Services/Foundations/NhsLogins/NhsLoginService.Exceptions.cs
Show resolved
Hide resolved
LondonDataServices.IDecide.Core/Services/Foundations/NhsLogins/NhsLoginService.Exceptions.cs
Outdated
Show resolved
Hide resolved
LondonDataServices.IDecide.Core/Services/Foundations/NhsLogins/NhsLoginService.Exceptions.cs
Outdated
Show resolved
Hide resolved
....Tests.Unit/Services/Foundations/NhsLogins/NhsLoginServiceTests.Validations.NhsLoginAsync.cs
Show resolved
Hide resolved
....Tests.Unit/Services/Foundations/NhsLogins/NhsLoginServiceTests.Validations.NhsLoginAsync.cs
Show resolved
Hide resolved
...e.Core.Tests.Unit/Services/Foundations/NhsLogins/NhsLoginServiceTests.NhsLoginAsync.Logic.cs
Show resolved
Hide resolved
...e.Core.Tests.Unit/Services/Foundations/NhsLogins/NhsLoginServiceTests.NhsLoginAsync.Logic.cs
Show resolved
Hide resolved
...e.Tests.Unit/Services/Foundations/NhsLogins/NhsLoginServiceTests.NhsLoginAsync.Exceptions.cs
Show resolved
Hide resolved
cjdutoit
requested changes
Jan 26, 2026
LondonDataServices.IDecide.Core/Brokers/Securities/SecurityBroker.cs
Outdated
Show resolved
Hide resolved
LondonDataServices.IDecide.Core/Brokers/Securities/ISecurityBroker.cs
Outdated
Show resolved
Hide resolved
LondonDataServices.IDecide.Core/Services/Foundations/NhsLogins/NhsLoginService.Validations.cs
Outdated
Show resolved
Hide resolved
LondonDataServices.IDecide.Core/Services/Foundations/NhsLogins/NhsLoginService.Exceptions.cs
Outdated
Show resolved
Hide resolved
LondonDataServices.IDecide.Core/Services/Foundations/NhsLogins/NhsLoginService.Exceptions.cs
Outdated
Show resolved
Hide resolved
LondonDataServices.IDecide.Core/Services/Foundations/NhsLogins/NhsLoginService.Exceptions.cs
Outdated
Show resolved
Hide resolved
...e.Tests.Unit/Services/Foundations/NhsLogins/NhsLoginServiceTests.NhsLoginAsync.Exceptions.cs
Show resolved
Hide resolved
....Tests.Unit/Services/Foundations/NhsLogins/NhsLoginServiceTests.Validations.NhsLoginAsync.cs
Outdated
Show resolved
Hide resolved
....Tests.Unit/Services/Foundations/NhsLogins/NhsLoginServiceTests.Validations.NhsLoginAsync.cs
Outdated
Show resolved
Hide resolved
....Tests.Unit/Services/Foundations/NhsLogins/NhsLoginServiceTests.Validations.NhsLoginAsync.cs
Show resolved
Hide resolved
LondonDataServices.IDecide.Portal.Client/src/pages/nhsLoginOptOutPage.tsx
Show resolved
Hide resolved
LondonDataServices.IDecide.Portal.Client/src/pages/nhsLoginOptOutPage.tsx
Show resolved
Hide resolved
LondonDataServices.IDecide.Core/Services/Foundations/NhsLogins/NhsLoginService.Validations.cs
Outdated
Show resolved
Hide resolved
cjdutoit
requested changes
Jan 27, 2026
LondonDataServices.IDecide.Core/Services/Foundations/NhsLogins/NhsLoginService.Validations.cs
Outdated
Show resolved
Hide resolved
cjdutoit
previously approved these changes
Jan 27, 2026
LondonDataServices.IDecide.Core/Services/Foundations/NhsLogins/NhsLoginService.Validations.cs
Show resolved
Hide resolved
cjdutoit
approved these changes
Jan 27, 2026
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.
CLOSES AB#27342