oauth2 — Provider class

class oauth2.Provider(access_token_store, auth_code_store, client_store, site_adapter, token_generator, response_class=<class 'oauth2.web.Response'>)[source]
Provider.add_grant(grant)[source]

Adds a Grant that the provider should support.

Provider.dispatch(request, environ)[source]

Checks which Grant supports the current request and dispatches to it.

Parameters:
  • request – An instance of oauth2.web.Request.
  • environ – Hash containing variables of the environment.
Returns:

An instance of oauth2.web.Response.