- class Pyjo.GCP.Credentials.AuthorizedUser.Pyjo_GCP_Credentials_AuthorizedUser(*, client_id: str, client_secret: str, refresh_token: str, token_uri: str | None = None, quota_project: str | None = None, universe_domain: str | None = None, account: str | None = None, **kwargs: Any)[source]¶
Pyjo.GCP.Credentials.AuthorizedUserinherits all attributes and methods fromPyjo.GCP.Credentials.Providerand implements the following new ones.- __init__(*, client_id: str, client_secret: str, refresh_token: str, token_uri: str | None = None, quota_project: str | None = None, universe_domain: str | None = None, account: str | None = None, **kwargs: Any) None[source]¶
provider = Pyjo.GCP.Credentials.AuthorizedUser.new(client_id=client_id, client_secret=client_secret, refresh_token=refresh_token)
Construct a new
Pyjo.GCP.Credentials.AuthorizedUserobject, with the options ofPyjo.GCP.Credentials.Provider.
- account¶
account = provider.account
The email of the user, or
None.
- client_id¶
client_id = provider.client_id
The ID of the client of OAuth 2.0, as the one of gcloud.
- client_secret¶
client_secret = provider.client_secret
The secret of the client of OAuth 2.0.
- async fetch() Pyjo_GCP_Credentials[source]¶
credentials = await provider.fetch()
The access token of the refresh token.
- classmethod from_info(info: Mapping[str, Any], **kwargs: Any) Self[source]¶
provider = AuthorizedUser.from_info(info) provider = AuthorizedUser.from_info(info, quota_project='myproject', ua=ua)
A new provider of the JSON object of a file of the type
authorized_user, withquota_project_id,universe_domain,accountandtoken_uriof the file, and the arguments over them, or aPyjo.Exceptionof a file withoutclient_id,client_secretorrefresh_token.
- quota_project¶
project = provider.quota_project
The quota project of the credentials, or
None.
- refresh_token¶
refresh_token = provider.refresh_token
The refresh token of the user.
- token_uri¶
url = provider.token_uri
The token endpoint of OAuth 2.0,
https://oauth2.googleapis.com/tokenby default.
- universe_domain¶
domain = provider.universe_domain
The universe domain of the credentials, or
None.
- Pyjo.GCP.Credentials.AuthorizedUser.TOKEN_URI = 'https://oauth2.googleapis.com/token'¶
The token endpoint of OAuth 2.0 of Google.