Skip to content

Token provider support for Go driver (1/3)#290

Merged
madhav-db merged 3 commits intomainfrom
token-provider-foundation
Dec 9, 2025
Merged

Token provider support for Go driver (1/3)#290
madhav-db merged 3 commits intomainfrom
token-provider-foundation

Conversation

@madhav-db
Copy link
Contributor

@madhav-db madhav-db commented Oct 30, 2025

Implements token provider support for the go driver

madhav-db and others added 2 commits October 30, 2025 05:17
This introduces a flexible TokenProvider interface that allows custom
authentication implementations:

- TokenProvider interface with static, external function support
- Token struct with expiration handling
- Authenticator wrapper for integration with existing auth system
- Connector functions: WithTokenProvider, WithExternalToken, WithStaticToken

This foundation enables custom token management strategies without
requiring changes to the core driver.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Reduce token expiry buffer from 5 minutes to 30 seconds (matches SDK standard)
- Add detailed documentation to TokenProviderAuthenticator explaining flow
- Add ctx.Err() check in ExternalTokenProvider for cancellation support
- Rename tokenFunc to tokenSource for better clarity
- Remove duplicate empty token validation from ExternalTokenProvider
- Update tests to reflect changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@madhav-db madhav-db merged commit 0926d14 into main Dec 9, 2025
2 of 3 checks passed
@madhav-db madhav-db deleted the token-provider-foundation branch December 9, 2025 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants