You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.5 KiB
Python
57 lines
1.5 KiB
Python
"""
|
|
This type stub file was generated by pyright.
|
|
"""
|
|
|
|
"""Helpers for authentication using oauth2client or google-auth."""
|
|
HAS_GOOGLE_AUTH = ...
|
|
HAS_OAUTH2CLIENT = ...
|
|
def credentials_from_file(filename, scopes=..., quota_project_id=...): # -> Credentials | ServiceAccountCredentials:
|
|
"""Returns credentials loaded from a file."""
|
|
...
|
|
|
|
def default_credentials(scopes=..., quota_project_id=...):
|
|
"""Returns Application Default Credentials."""
|
|
...
|
|
|
|
def with_scopes(credentials, scopes): # -> Scoped:
|
|
"""Scopes the credentials if necessary.
|
|
|
|
Args:
|
|
credentials (Union[
|
|
google.auth.credentials.Credentials,
|
|
oauth2client.client.Credentials]): The credentials to scope.
|
|
scopes (Sequence[str]): The list of scopes.
|
|
|
|
Returns:
|
|
Union[google.auth.credentials.Credentials,
|
|
oauth2client.client.Credentials]: The scoped credentials.
|
|
"""
|
|
...
|
|
|
|
def authorized_http(credentials): # -> AuthorizedHttp:
|
|
"""Returns an http client that is authorized with the given credentials.
|
|
|
|
Args:
|
|
credentials (Union[
|
|
google.auth.credentials.Credentials,
|
|
oauth2client.client.Credentials]): The credentials to use.
|
|
|
|
Returns:
|
|
Union[httplib2.Http, google_auth_httplib2.AuthorizedHttp]: An
|
|
authorized http client.
|
|
"""
|
|
...
|
|
|
|
def refresh_credentials(credentials):
|
|
...
|
|
|
|
def apply_credentials(credentials, headers):
|
|
...
|
|
|
|
def is_valid(credentials): # -> bool:
|
|
...
|
|
|
|
def get_credentials_from_http(http): # -> None:
|
|
...
|
|
|