diff --git a/docs/epy/api-objects.txt b/docs/epy/api-objects.txt index 20ef7d4..6c5d3d5 100644 --- a/docs/epy/api-objects.txt +++ b/docs/epy/api-objects.txt @@ -1,6 +1,7 @@ oauth2client oauth2client-module.html oauth2client.GOOGLE_REVOKE_URI oauth2client-module.html#GOOGLE_REVOKE_URI oauth2client.GOOGLE_TOKEN_URI oauth2client-module.html#GOOGLE_TOKEN_URI +oauth2client.GOOGLE_DEVICE_URI oauth2client-module.html#GOOGLE_DEVICE_URI oauth2client.GOOGLE_AUTH_URI oauth2client-module.html#GOOGLE_AUTH_URI oauth2client.anyjson oauth2client.anyjson-module.html oauth2client.appengine oauth2client.appengine-module.html @@ -358,7 +359,10 @@ oauth2client.client.OAuth2Credentials._do_refresh_request oauth2client.client.OA oauth2client.client.OAuth2Credentials.refresh oauth2client.client.OAuth2Credentials-class.html#refresh oauth2client.client.OAuth2Credentials.get_access_token oauth2client.client.OAuth2Credentials-class.html#get_access_token oauth2client.client.OAuth2Credentials.access_token_expired oauth2client.client.OAuth2Credentials-class.html#access_token_expired +oauth2client.client.OAuth2DeviceCodeError oauth2client.client.OAuth2DeviceCodeError-class.html oauth2client.client.OAuth2WebServerFlow oauth2client.client.OAuth2WebServerFlow-class.html +oauth2client.client.OAuth2WebServerFlow._extract_codes oauth2client.client.OAuth2WebServerFlow-class.html#_extract_codes +oauth2client.client.OAuth2WebServerFlow.step1_get_device_and_user_codes oauth2client.client.OAuth2WebServerFlow-class.html#step1_get_device_and_user_codes oauth2client.client.OAuth2WebServerFlow.step2_exchange oauth2client.client.OAuth2WebServerFlow-class.html#step2_exchange oauth2client.client.OAuth2WebServerFlow.step1_get_authorize_url oauth2client.client.OAuth2WebServerFlow-class.html#step1_get_authorize_url oauth2client.client.OAuth2WebServerFlow.__init__ oauth2client.client.OAuth2WebServerFlow-class.html#__init__ diff --git a/docs/epy/class-tree.html b/docs/epy/class-tree.html index b20c33b..c9ff039 100644 --- a/docs/epy/class-tree.html +++ b/docs/epy/class-tree.html @@ -95,10 +95,10 @@
  • oauth2client.crypt.AppIdentityError
  • -
  • oauth2client.file.CredentialsFileSymbolicLinkError: +
  • oauth2client.locked_file.CredentialsFileSymbolicLinkError: Credentials files must not be symbolic links.
  • -
  • oauth2client.locked_file.CredentialsFileSymbolicLinkError: +
  • oauth2client.file.CredentialsFileSymbolicLinkError: Credentials files must not be symbolic links.
  • oauth2client.multistore_file.Error: @@ -173,7 +173,7 @@ @@ -630,29 +631,37 @@
    + + + + + - + - + - @@ -660,19 +669,12 @@ (in oauth2client.crypt) - - - - - -

    P

    @@ -759,75 +761,81 @@ save_to_well_known_file()
    (in oauth2client.client) -service_account
    -(in oauth2client) -SiteXsrfSecretKey
    -(in oauth2client.appengine) - - -scopes_to_string()
    -(in oauth2client.util) service_account_email()
    (in _ServiceAccountCredentials) -SiteXsrfSecretKeyNDB
    -(in oauth2client.appengine) - - -secret
    -(in SiteXsrfSecretKey) -set()
    -(in MemoryCache) step1_get_authorize_url()
    (in OAuth2WebServerFlow) -secret
    -(in SiteXsrfSecretKeyNDB) +scopes_to_string()
    +(in oauth2client.util) +set()
    +(in MemoryCache) +step1_get_device_and_user_codes()
    +(in OAuth2WebServerFlow) + + +secret
    +(in SiteXsrfSecretKey) set_credentials()
    (in OAuth2Decorator) step2_exchange()
    (in OAuth2WebServerFlow) -serialization_data()
    -(in AppAssertionCredentials) +secret
    +(in SiteXsrfSecretKeyNDB) set_flow()
    (in OAuth2Decorator) Storage
    (in oauth2client.client) -serialization_data()
    -(in GoogleCredentials) +serialization_data()
    +(in AppAssertionCredentials) set_store()
    (in OAuth2Credentials) Storage
    (in oauth2client.django_orm) -serialization_data()
    -(in AppAssertionCredentials) +serialization_data()
    +(in GoogleCredentials) sign_blob()
    (in _ServiceAccountCredentials) Storage
    (in oauth2client.file) -serialization_data()
    -(in _ServiceAccountCredentials) +serialization_data()
    +(in AppAssertionCredentials) SignedJwtAssertionCredentials
    (in oauth2client.client) Storage
    (in oauth2client.keyring_storage) -SERVICE_ACCOUNT
    -(in oauth2client.client) +serialization_data()
    +(in _ServiceAccountCredentials) Signer
    (in oauth2client.crypt) StorageByKeyName
    (in oauth2client.appengine) + +SERVICE_ACCOUNT
    +(in oauth2client.client) +SiteXsrfSecretKey
    +(in oauth2client.appengine) +  + + +service_account
    +(in oauth2client) +SiteXsrfSecretKeyNDB
    +(in oauth2client.appengine) +  +

    T

    @@ -929,7 +937,7 @@ (in OAuth2Credentials) _display_error_message()
    (in OAuth2Decorator) -_multistores_lock
    +_multistores
    (in oauth2client.multistore_file) @@ -937,267 +945,275 @@ (in AppAssertionCredentials) _do_refresh_request()
    (in OAuth2Credentials) -_Opener
    -(in oauth2client.locked_file) +_multistores_lock
    +(in oauth2client.multistore_file) __init__()
    (in OAuth2Decorator) _do_revoke()
    (in OAuth2Credentials) -_parse_exchange_token_response()
    -(in oauth2client.client) +_Opener
    +(in oauth2client.locked_file) __init__()
    (in OAuth2DecoratorFromClientSecrets) _env_name
    (in oauth2client.client) -_parse_pem_key()
    -(in oauth2client.crypt) +_parse_exchange_token_response()
    +(in oauth2client.client) __init__()
    (in StorageByKeyName) _expires_in()
    (in OAuth2Credentials) -_parse_state_value()
    -(in oauth2client.appengine) +_parse_pem_key()
    +(in oauth2client.crypt) __init__()
    (in AccessTokenCredentials) +_extract_codes()
    +(in OAuth2WebServerFlow) +_parse_state_value()
    +(in oauth2client.appengine) + + +__init__()
    +(in AssertionCredentials) _extract_id_token()
    (in oauth2client.client) _posix_lockfile()
    (in _PosixOpener) -__init__()
    -(in AssertionCredentials) +__init__()
    +(in GoogleCredentials) _FcntlOpener
    (in oauth2client.locked_file) _PosixOpener
    (in oauth2client.locked_file) -__init__()
    -(in GoogleCredentials) +__init__()
    +(in MemoryCache) _from_base_type()
    (in CredentialsNDBProperty) _raise_exception_for_missing_fields()
    (in oauth2client.client) -__init__()
    -(in MemoryCache) +__init__()
    +(in OAuth2Credentials) _generate_assertion()
    (in AssertionCredentials) _raise_exception_for_reading_json()
    (in oauth2client.client) -__init__()
    -(in OAuth2Credentials) +__init__()
    +(in OAuth2WebServerFlow) _generate_assertion()
    (in SignedJwtAssertionCredentials) _refresh()
    (in AppAssertionCredentials) -__init__()
    -(in OAuth2WebServerFlow) +__init__()
    +(in SignedJwtAssertionCredentials) _generate_assertion()
    (in _ServiceAccountCredentials) _refresh()
    (in AccessTokenCredentials) -__init__()
    -(in SignedJwtAssertionCredentials) +__init__()
    +(in CredentialsField) _generate_new_xsrf_secret_key()
    (in oauth2client.appengine) _refresh()
    (in OAuth2Credentials) -__init__()
    -(in CredentialsField) +__init__()
    +(in FlowField) _generate_refresh_request_body()
    (in AssertionCredentials) _refresh()
    (in AppAssertionCredentials) -__init__()
    -(in FlowField) +__init__()
    +(in Storage) _generate_refresh_request_body()
    (in OAuth2Credentials) _refresh_data_cache()
    (in _MultiStore) -__init__()
    -(in Storage) +__init__()
    +(in Storage) _generate_refresh_request_headers()
    (in OAuth2Credentials) _revoke()
    (in AccessTokenCredentials) -__init__()
    -(in Storage) +__init__()
    +(in AppAssertionCredentials) _get_all_credential_keys()
    (in _MultiStore) _revoke()
    (in AssertionCredentials) -__init__()
    -(in AppAssertionCredentials) +__init__()
    +(in Storage) _get_application_default_credential_from_file()
    (in oauth2client.client) _revoke()
    (in OAuth2Credentials) -__init__()
    -(in Storage) +__init__()
    +(in LockedFile) _get_application_default_credential_GAE()
    (in oauth2client.client) _safe_html()
    (in oauth2client.appengine) -__init__()
    -(in LockedFile) +__init__()
    +(in _Opener) _get_application_default_credential_GCE()
    (in oauth2client.client) _ServiceAccountCredentials
    (in oauth2client.service_account) -__init__()
    -(in _Opener) +__init__()
    +(in _Storage) _get_credential()
    (in _MultiStore) _Storage
    (in _MultiStore) -__init__()
    -(in _Storage) +__init__()
    +(in _MultiStore) _get_entity()
    (in StorageByKeyName) _to_base_type()
    (in CredentialsNDBProperty) -__init__()
    -(in _MultiStore) +__init__()
    +(in _ServiceAccountCredentials) _get_environment()
    (in oauth2client.client) _to_json()
    (in Credentials) -__init__()
    -(in _ServiceAccountCredentials) +__metaclass__
    +(in CredentialsField) _get_environment_variable_file()
    (in oauth2client.client) _unlock()
    (in _MultiStore) -__metaclass__
    -(in CredentialsField) +__metaclass__
    +(in FlowField) _get_kind()
    (in CredentialsNDBModel) _update_credential()
    (in _MultiStore) -__metaclass__
    -(in FlowField) +__setstate__()
    +(in OAuth2Credentials) _get_kind()
    (in SiteXsrfSecretKeyNDB) _update_query_params()
    (in oauth2client.client) -__setstate__()
    -(in OAuth2Credentials) +_abstract()
    +(in oauth2client.client) _get_multistore()
    (in oauth2client.multistore_file) _updateFromCredential()
    (in OAuth2Credentials) -_abstract()
    -(in oauth2client.client) +_add_query_parameter()
    +(in oauth2client.util) _get_private_key()
    (in oauth2client.service_account) _urlsafe_b64decode()
    (in oauth2client.client) -_add_query_parameter()
    -(in oauth2client.util) +_build_state_value()
    +(in oauth2client.appengine) _get_storage()
    (in _MultiStore) _urlsafe_b64decode()
    (in oauth2client.crypt) -_build_state_value()
    -(in oauth2client.appengine) +_cached_http
    +(in oauth2client.client) _get_well_known_file()
    (in oauth2client.client) _urlsafe_b64encode()
    (in oauth2client.crypt) -_cached_http
    -(in oauth2client.client) +_CLIENT_SECRETS_MESSAGE
    +(in oauth2client.tools) _is_ndb()
    (in StorageByKeyName) _urlsafe_b64encode()
    (in oauth2client.service_account) -_CLIENT_SECRETS_MESSAGE
    -(in oauth2client.tools) +_create_file_if_needed()
    +(in Storage) _json_encode()
    (in oauth2client.crypt) _validate()
    (in CredentialsNDBProperty) -_create_file_if_needed()
    -(in Storage) +_create_file_if_needed()
    +(in _MultiStore) _loadfile()
    (in oauth2client.clientsecrets) _validate()
    (in FlowNDBProperty) -_create_file_if_needed()
    -(in _MultiStore) +_create_flow()
    +(in OAuth2Decorator) _lock()
    (in _MultiStore) _validate_clientsecrets()
    (in oauth2client.clientsecrets) -_create_flow()
    -(in OAuth2Decorator) +_decode_credential_from_json()
    +(in _MultiStore) _locked_json_read()
    (in _MultiStore) _validate_file()
    (in Storage) -_decode_credential_from_json()
    +_delete_credential()
    (in _MultiStore) _locked_json_write()
    (in _MultiStore) @@ -1205,20 +1221,13 @@ (in oauth2client.locked_file) -_delete_credential()
    -(in _MultiStore) +_delete_entity()
    +(in StorageByKeyName) _MultiStore
    (in oauth2client.multistore_file) _write()
    (in _MultiStore) - -_delete_entity()
    -(in StorageByKeyName) -_multistores
    -(in oauth2client.multistore_file) -  - @@ -1248,7 +1257,7 @@ + + + + + + @@ -137,7 +183,7 @@ OAuth2WebServerFlow objects may be safely pickled and unpickled.
    +   + + + + + + +
    _extract_codes(self, + body)
    + Parses the JSON response of a device and user codes request.
    + source code + +
    + +
    +   + + + + + + +
    step1_get_device_and_user_codes(self, + http=None)
    + Returns a user code and the verification URL where to enter it
    + source code + +
    +
    step2_exchange(self, - code, + code=None, http=None)
    Exchanges a code for OAuth2Credentials.
    @@ -228,6 +274,7 @@ OAuth2WebServerFlow objects may be safely pickled and unpickled. token_uri=GOOGLE_TOKEN_URI, revoke_uri=GOOGLE_REVOKE_URI, login_hint=None, + device_uri=GOOGLE_DEVICE_URI, **kwargs)
    (Constructor) @@ -261,6 +308,8 @@ Args: login_hint: string, Either an email address or domain. Passing this hint will either pre-fill the email box on the sign-in form or select the proper multi-login session, thereby simplifying the login flow. + device_uri: string, URI for device authorization endpoint. For convenience + defaults to Google's endpoints but any OAuth 2.0 provider can be used. **kwargs: dict, The keyword arguments are all optional and required parameters for the OAuth calls. @@ -303,6 +352,63 @@ Args: Returns: A URI as a string to redirect the user to begin the authorization flow. + +
    +
    Decorators:
    +
      +
    • @util.positional(1)
    • +
    +
    +
    + + +
    + +
    + + +
    +

    _extract_codes(self, + body) +

    +
    source code  +
    + +
    +Parses the JSON response of a device and user codes request.
    +
    +Args:
    +  body: string, the body of a response
    +
    +
    +
    +
    +
    +
    + +
    + +
    + + +
    +

    step1_get_device_and_user_codes(self, + http=None) +

    +
    source code  +
    + +
    +Returns a user code and the verification URL where to enter it
    +
    +Returns:
    +  A user code as a string for the user to authorize the application
    +  An URL as a string where the user has to enter the code
    +
     
    Decorators:
    @@ -320,7 +426,7 @@ Returns:

    step2_exchange(self, - code, + code=None, http=None)