Repository navigation
feat(util): add parallel cloud.google.com/go/auth options and handlers - #197
Merged
agrawalradhika-cell merged 5 commits intoOct 30, 2026
Conversation
andyrzhao
self-requested a review
October 28, 2026 21:33
andyrzhao
previously approved these changes
Oct 28, 2026
andyrzhao
approved these changes
Oct 30, 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.
Summary
As part of the incremental migration from
golang.org/x/oauth2tocloud.google.com/go/auth(following #196), this PR introduces parallelcloud.google.com/go/authtypes, helpers, and handlers inutil/settings.go,util/pkce.go, andutil/auth-handlers.gowhile keeping all existinggolang.org/x/oauth2/authhandlerAPIs intact and marked deprecated.Changes
util/settings.go&util/fetch.go:GoogleAuthHandler auth.AuthorizationHandlertoSettings(with precedence documented) and markedAuthHandler authhandler.AuthorizationHandlerasDeprecated: Use GoogleAuthHandler instead..Settings.Statedoc comment to referenceGoogleAuthHandler(or the deprecatedAuthHandler).resolveAuthHandler()onSettingswhich prefersGoogleAuthHandlerand falls back to convertingAuthHandler(auth.AuthorizationHandler(s.AuthHandler)), and wired it intoFindJSONCredentialsinutil/fetch.goso callers settingGoogleAuthHandlerare honored immediately.util/pkce.go:GeneratePKCEOptions() *auth.PKCEOptionsusing RFC 7636 S256 challenge generation.GeneratePKCEParams() *authhandler.PKCEParamsas a deprecated wrapper delegating toGeneratePKCEOptions().util/auth-handlers.go:Get3LOAuthHandler(...) auth.AuthorizationHandler.Get3LOAuthorizationHandler(...) authhandler.AuthorizationHandleras a deprecated wrapper delegating toGet3LOAuthHandler(...).util/settings_test.go,util/pkce_test.go, andutil/auth-handlers_test.gocoveringresolveAuthHandlerprecedence,FindJSONCredentialshonoringGoogleAuthHandler,GetAuthType, PKCE challenge derivation (GeneratePKCEOptions&GeneratePKCEParams), and 3LO loopback/OOB handlers (Get3LOAuthHandler&Get3LOAuthorizationHandler).Testing
go test -v ./util/...make buildmake test