Skip to content

Conversation

@madhav-db
Copy link

No description provided.

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>
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.

3 participants