minetgate / google-api-python-client

Automatically exported from code.google.com/p/google-api-python-client
0 stars 0 forks source link

Allow custom StorageByKeyName and CredentialsModel classes to be passed to OAuth2Decorator #256

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Allow custom StorageByKeyName and CredentialsModel classes to be passed to 
OAuth2Decorator

I figured we could add them to the constructor via "protected" kwargs:

  @util.positional(4)
  def __init__(self, client_id, client_secret, scope,
               auth_uri=GOOGLE_AUTH_URI,
               token_uri=GOOGLE_TOKEN_URI,
               revoke_uri=GOOGLE_REVOKE_URI,
               user_agent=None,
               message=None,
               callback_path='/oauth2callback',
               token_response_param=None,
               _storage_class=StorageByKeyName,
               _credentials_class=CredentialsModel,
               **kwargs):

We also may want to consider passing the entire user to StorageByKeyName 
instead of just the ID, though that may require a breaking change to public 
classes/functions, and hence be impossible.

Original issue reported on code.google.com by dhermes@google.com on 2 Apr 2013 at 12:49

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 07913911fbd1.

Original comment by dhermes@google.com on 5 Apr 2013 at 4:58