Some APIs can benefit from using JWT-based credentials over OAuth 2.0-based credentials. Those APIs should upgrade to jwt.OnDemandCredentials if they are provided an instance of google.auth.credentials.Signing.
So, for example:
credentials, _ = google.auth.default()
if isinstance(credentials, google.auth.credentials.Signing):
jwt_credentials = google.auth.jwt.OnDemandCredentials.from_signing_credentials(credentials)
Some APIs can benefit from using JWT-based credentials over OAuth 2.0-based credentials. Those APIs should upgrade to
jwt.OnDemandCredentials
if they are provided an instance ofgoogle.auth.credentials.Signing
.So, for example: