Package oauth2client :: Module service_account :: Class _ServiceAccountCredentials
[hide private]
[frames] | no frames]

Class _ServiceAccountCredentials

source code


Class representing a service account (signed JWT) credential.

Instance Methods [hide private]
 
__init__(self, service_account_id, service_account_email, private_key_id, private_key_pkcs8_text, scopes, user_agent=None, token_uri=GOOGLE_TOKEN_URI, revoke_uri=GOOGLE_REVOKE_URI, **kwargs)
Constructor for AssertionFlowCredentials.
source code
 
_generate_assertion(self)
Generate the assertion that will be used in the request.
source code
 
sign_blob(self, blob) source code
 
service_account_email(self) source code
 
serialization_data(self)
Get the fields and their values identifying the current credentials.
source code
 
create_scoped_required(self)
Whether this Credentials object is scopeless.
source code
 
create_scoped(self, scopes)
Create a Credentials object for the given scopes.
source code

Inherited from client.OAuth2Credentials: __getstate__, __setstate__, access_token_expired, apply, authorize, get_access_token, refresh, revoke, set_store, to_json

Inherited from client.Credentials (private): _to_json

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from client.OAuth2Credentials: from_json

Inherited from client.Credentials: new_from_json

Static Methods [hide private]

Inherited from client.GoogleCredentials: from_stream, get_application_default

Class Variables [hide private]
  MAX_TOKEN_LIFETIME_SECS = 3600

Inherited from client.Credentials: NON_SERIALIZED_MEMBERS

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, service_account_id, service_account_email, private_key_id, private_key_pkcs8_text, scopes, user_agent=None, token_uri=GOOGLE_TOKEN_URI, revoke_uri=GOOGLE_REVOKE_URI, **kwargs)
(Constructor)

source code 
Constructor for AssertionFlowCredentials.

Args:
  assertion_type: string, assertion type that will be declared to the auth
    server
  user_agent: string, The HTTP User-Agent to provide for this application.
  token_uri: string, URI for token endpoint. For convenience
    defaults to Google's endpoints but any OAuth 2.0 provider can be used.
  revoke_uri: string, URI for revoke endpoint.

Overrides: object.__init__
(inherited documentation)

_generate_assertion(self)

source code 
Generate the assertion that will be used in the request.

Overrides: client.AssertionCredentials._generate_assertion

service_account_email(self)

source code 
Decorators:
  • @property

serialization_data(self)

source code 
Get the fields and their values identifying the current credentials.

Decorators:
  • @property
Overrides: client.GoogleCredentials.serialization_data
(inherited documentation)

create_scoped_required(self)

source code 
Whether this Credentials object is scopeless.

create_scoped(scopes) method needs to be called in order to create
a Credentials object for API calls.

Overrides: client.GoogleCredentials.create_scoped_required
(inherited documentation)

create_scoped(self, scopes)

source code 
Create a Credentials object for the given scopes.

The Credentials type is preserved.

Overrides: client.GoogleCredentials.create_scoped
(inherited documentation)