Repository navigation
[common.oauth] Allow customization of 'Authorization' header token type format - #1187
Merged
Merged
Conversation
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.
The most common OAuth 'Authorization' header format is simply:
Bearer <...token>, but there are other custom token type allowed.For example, per https://docs.snowflake.com/en/developer-guide/snowflake-ml/model-registry/container#calling-the-service:
"With a Programmatic Access Token (PAT), authentication based on a token you generate on Snowflake. For information on setting up a PAT for use with Snowflake services, see Using programmatic access tokens for authentication. To use a PAT when calling a service, include the token in your Authorization request header:
Authorization: Snowflake Token="<your_token>"For example, with a PAT stored in the environment variable SNOWFLAKE_SERVICE_PAT and the predict(INTEGER, VARCHAR, TIMESTAMP) function signature used in previous examples, you could make a request to the endpoint random-id.myaccount.snowflakecomputing.app/predict with the following curl command:
"