Improved Authn logging - #126
Open
AustinSMueller wants to merge 5 commits into
Open
Conversation
- return user friendly error strings when login response is not HTTP code 200 - created a user friendly error for when the login or user info response is HTTP code 200 but invalid - enhanced logging for when an HTTP 200 response is received from the login endpoints but contains problems
expand unit testing coverage
Contributor
There was a problem hiding this comment.
Pull request overview
Adds NIH authentication response validation, diagnostic logging, and related tests.
Changes:
- Validates and parses NIH token/userinfo responses.
- Adds error logging for failed token and IDP handling.
- Expands HTTP and IDP test coverage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
apps/authn/services/nih-auth.js |
Adds response validation and logging. |
apps/authn/idps/nih.js |
Logs IDP resolution failures. |
apps/authn/test/nih-auth.http.test.js |
Tests NIH HTTP response handling. |
apps/authn/test/nih.idp.test.js |
Tests IDP failure logging. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- only log specified fields returned by the AuthN API requests, other fields will be logged as being present but without logging the actual values
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.
Overview
N/A
Change Details (Specifics)
N/A
Related Ticket(s)
N/A