Package simplify :: Class AccessToken
[hide private]
[frames] | no frames]

Class AccessToken

source code

domain.Domain --+
                |
               AccessToken

OAuth access token.

Instance Methods [hide private]
 
refresh(self, *auth_args)
Refreshes an AccessToken object.
source code
 
revoke(self, *auth_args)
Revokes an AccessToken object.
source code

Inherited from domain.Domain: __getitem__, __init__, __setitem__, __str__, class_name, to_dict

Static Methods [hide private]
 
create(auth_code, redirect_uri, *auth_args)
Creates an AccessToken object.
source code
Instance Variables [hide private]
  access_token
Access token used when making an API call authenticated using OAuth
  expires_in
Number of seconds from the time the token was created till it expires.
  refresh_token
Token used when refreshing an access token.
Method Details [hide private]

create(auth_code, redirect_uri, *auth_args)
Static Method

source code 

Creates an AccessToken object.

Parameters:
  • auth_codes - OAuth authentication code.
  • redirect_uri - URI to which OAuth requests are redirected.
  • auth_args - an Authentication object used for the API call. If no value is passed the gloabl keys simplify.public_key and simplify.private_key are used.
Returns:
an AccessToken object object

refresh(self, *auth_args)

source code 

Refreshes an AccessToken object. If successful the access_token, refresh_token and expires_in attributes are updated.

Parameters:
  • auth_args - an Authentication object used for the API call. If no value is passed the global keys simplify.public_key and simplify.private_key are used.

revoke(self, *auth_args)

source code 

Revokes an AccessToken object.

Parameters:
  • auth_args - an Authentication object used for the API call. If no value is passed the global keys simplify.public_key and simplify.private_key are used.