Remove dead TryAuthOIDCRequestWithPrefix function#107
Merged
Conversation
This function was the old OIDC authentication pattern used by individual handlers before the OIDCRegistry migration (PRs #78-#92). All handlers now use OIDCRegistry.TryAuth() instead, leaving TryAuthOIDCRequestWithPrefix with zero callers. Also removes 4 imports that were only used by the dead function: net/http, goproxy, helpers, and logging. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR removes unused legacy OIDC request-authentication code (TryAuthOIDCRequestWithPrefix) that was superseded by the OIDCRegistry migration, reducing confusion and cleaning up now-unneeded dependencies in the OIDC credential implementation.
Changes:
- Deleted the dead
TryAuthOIDCRequestWithPrefixhelper frominternal/oidc/oidc_credential.go. - Removed imports that were only used by that function (
net/http,goproxy,helpers,logging).
Show a summary per file
| File | Description |
|---|---|
internal/oidc/oidc_credential.go |
Removes legacy per-handler OIDC request auth helper and related unused imports, aligning with current OIDCRegistry.TryAuth usage. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
AbhishekBhaskar
approved these changes
Apr 21, 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.
What are you trying to accomplish?
Remove dead code left behind after the OIDCRegistry migration (PRs #78–#92). The
TryAuthOIDCRequestWithPrefixfunction ininternal/oidc/oidc_credential.gowas the old per-handler OIDC authentication pattern. All handlers now useOIDCRegistry.TryAuth()instead, leaving this function with zero callers anywhere in the codebase.Cleaning this up reduces confusion for future contributors and removes unused dependencies from the file.
Anything you want to highlight for special attention from reviewers?
Removing the function also allows removing 4 imports that were only used by it:
net/http,goproxy,helpers, andlogging. Thesyncimport is retained since it is still used by theOIDCCredential.mutexfield.The
CreateOIDCCredentialcalls in cargo/hex/pub handlers (used as guard clauses to skip URL-less OIDC credentials) were reviewed and confirmed to be intentional, not dead code.How will you know you have accomplished your goal?
grepacross the entire codebasego build ./...succeedsgo test ./...passes (all packages)Checklist