go-sdk/auth
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Scott Leggett beb3d1ab7a
auth: support OAuth2 session persistence (#1058)
This change adds NewTokenSource and InitialTokenSource fields to
AuthorizationCodeHandlerConfig. NewTokenSource enables wrapping the
underlying token source to intercept token refreshes. InitialTokenSource
enables configuring the token source used by the
AuthorizationCodeHandler on initialization. Together these features
facilitate persisting OAuth2 sessions across restarts.

Includes a package example demonstrating the persistence pattern.

Fixes: #901.

See #901 for the previous discussion behind this design.

---------

Co-authored-by: Guglielmo Colombo <guglielmoc@google.com>
Co-authored-by: Jonathan Amsterdam <jba@users.noreply.github.com>
2026-07-13 15:10:05 +02:00
..
extauth mcp: add optional issuer validator for pre-registered client validation (SEP-2352) (#946) 2026-05-29 12:46:34 +00:00
auth.go auth: add ClockSkew option to RequireBearerTokenOptions (#969) 2026-06-05 12:16:43 +02:00
auth_example_test.go auth: support OAuth2 session persistence (#1058) 2026-07-13 15:10:05 +02:00
auth_test.go auth: add ClockSkew option to RequireBearerTokenOptions (#969) 2026-06-05 12:16:43 +02:00
authorization_code.go auth: support OAuth2 session persistence (#1058) 2026-07-13 15:10:05 +02:00
authorization_code_test.go auth: support OAuth2 session persistence (#1058) 2026-07-13 15:10:05 +02:00
client.go Enterprise managed authorization (#770) 2026-03-30 16:29:30 +02:00
shared.go all: stabilize client OAuth support (#861) 2026-03-31 12:36:31 +02:00
shared_test.go all: stabilize client OAuth support (#861) 2026-03-31 12:36:31 +02:00