SK-2504: Add support for custom tokenUri#228
Merged
saileshwar-skyflow merged 3 commits intorelease/26.1.0from Jan 27, 2026
Merged
SK-2504: Add support for custom tokenUri#228saileshwar-skyflow merged 3 commits intorelease/26.1.0from
saileshwar-skyflow merged 3 commits intorelease/26.1.0from
Conversation
Devesh-Skyflow
approved these changes
Jan 27, 2026
There was a problem hiding this comment.
Pull request overview
This PR adds support for custom token URIs to enable Bring Your Own Cloud (BYOC) integrations. The SDK now accepts an optional token_uri parameter in credentials, allowing users to specify custom authentication endpoints while maintaining backward compatibility with existing implementations.
Changes:
- Added validation for custom
token_uriin credentials using a newis_valid_urlhelper - Updated token generation functions to support
token_urioverride via options - Enhanced error handling with specific messages for token URI validation and bearer token retrieval failures
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| skyflow/utils/_helpers.py | Added is_valid_url helper function to validate URLs |
| skyflow/utils/init.py | Exported is_valid_url helper function |
| skyflow/utils/_skyflow_messages.py | Added error messages for invalid token URI and bearer token failures |
| skyflow/utils/validations/_validations.py | Added token URI validation in credentials and removed unnecessary validations |
| skyflow/vault/client/client.py | Added token URI pass-through and fixed exception type |
| skyflow/service_account/_utils.py | Added token URI validation and override support, improved error handling |
| tests/utils/test__helpers.py | Added tests for is_valid_url function |
| tests/utils/validations/test__validations.py | Added tests for token URI validation and removed obsolete test |
| tests/vault/client/test__client.py | Added tests for bearer token generation with custom token URI |
| tests/utils/test__utils.py | Added comprehensive tests for token generation with custom token URI |
| tests/service_account/test__utils.py | Added tests for service account token generation error scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
skyflow-bharti
approved these changes
Jan 27, 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.
Why
Outcome