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
Original issue reported on code.google.com by
dhermes@google.com
on 2 Apr 2013 at 12:49