feat: Introduce the functionality to override token_uri in credentials#1159
feat: Introduce the functionality to override token_uri in credentials#1159sai-sunder-s merged 2 commits intomainfrom
Conversation
| enable_reauth_refresh=self._enable_reauth_refresh, | ||
| ) | ||
|
|
||
| @_helpers.copy_docstring(credentials.CredentialsWithTokenUri) |
There was a problem hiding this comment.
Why this is needed for the credentials.py? What credentials types it affects?
There was a problem hiding this comment.
Python library uses helper methods to override things like quota project, scopes etc. checkout with_quota_project method in many credentials.
This override method is added to all the credentials that have a token uri.
There was a problem hiding this comment.
That is the question - do we need it for every credential type?
There was a problem hiding this comment.
Why the auth credetials has it as not implemented exception and here we have a default implementation? It is preferable to have explicit implementation
There was a problem hiding this comment.
There was a problem hiding this comment.
credentials.py is user credential. It is not a base class for other credentials. Base class is the credentials.py in auth package.
There was a problem hiding this comment.
figured out that this is in fact user creds
|
Please add description for the change |
There are scenarios where a custom token endpoint needs to be used. Currently the only way to provide a custom token endpoint is if a credential is created directly from the constructor. For example if a service account is loaded from a file, then custom token endpoint cannot be provided. This change introduces a method that overrides token endpoint after credential creation.