Module Expr Str ImportFrom alias alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr BoolOpOr NameLoad Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Str Str TryExcept body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr Str NameLoad Return TupleLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot Call NameLoad NameLoad Str NameLoad body Raise Call AttributeLoad NameLoad attr Str keyword NameLoad If UnaryOpNot CompareEq AttributeLoad NameLoad attr Str body Raise Call AttributeLoad NameLoad attr keyword NameLoad For NameStore TupleLoad Str Str body If CompareIn NameLoad AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr keyword BinOpMod Str NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Raise Call AttributeLoad NameLoad attr keyword NameLoad orelse If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr Str body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BoolOpOr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
oauthlib.oauth2.rfc6749.grant_types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 __future__ unicode_literals absolute_import N/A json N/A logging base GrantTypeBase N/A errors request_validator RequestValidator N/A log N/A N/A logging getLogger __name__ ClientCredentialsGrant N/A GrantTypeBase N/A N/A `Client Credentials Grant`_

    The client can request an access token using only its client
    credentials (or other supported means of authentication) when the
    client is requesting access to the protected resources under its
    control, or those of another resource owner that have been previously
    arranged with the authorization server (the method of which is beyond
    the scope of this specification).

    The client credentials grant type MUST only be used by confidential
    clients::

        +---------+                                  +---------------+
        :         :                                  :               :
        :         :>-- A - Client Authentication --->: Authorization :
        : Client  :                                  :     Server    :
        :         :<-- B ---- Access Token ---------<:               :
        :         :                                  :               :
        +---------+                                  +---------------+

    Figure 6: Client Credentials Flow

    The flow illustrated in Figure 6 includes the following steps:

    (A)  The client authenticates with the authorization server and
            requests an access token from the token endpoint.

    (B)  The authorization server authenticates the client, and if valid,
            issues an access token.

    .. _`Client Credentials Grant`: http://tools.ietf.org/html/rfc6749#section-4.4
     __init__ N/A N/A self request_validator N/A None N/A N/A N/A self request_validator N/A request_validator N/A RequestValidator N/A create_token_response N/A N/A self request token_handler N/A N/A N/A Return token or error in JSON format.

        If the access token request is valid and authorized, the
        authorization server issues an access token as described in
        `Section 5.1`_.  A refresh token SHOULD NOT be included.  If the request
        failed client authentication or is invalid, the authorization server
        returns an error response as described in `Section 5.2`_.

        .. _`Section 5.1`: http://tools.ietf.org/html/rfc6749#section-5.1
        .. _`Section 5.2`: http://tools.ietf.org/html/rfc6749#section-5.2
         N/A headers N/A Content-Type Cache-Control Pragma application/json no-store no-cache N/A N/A N/A N/A N/A log debug Validating access token request, %r. request N/A N/A N/A self validate_token_request request N/A N/A N/A N/A errors OAuth2Error N/A e N/A N/A N/A N/A log debug Client error in token request. %s. e N/A N/A headers N/A e json N/A e status_code N/A token N/A N/A token_handler create_token request refresh_token False N/A N/A N/A log debug Issuing token to client id %r (%r), %r. N/A request client_id N/A request client token N/A N/A headers N/A N/A json dumps token 200 N/A validate_token_request N/A N/A self request N/A N/A N/A N/A N/A getattr request grant_type None N/A N/A N/A N/A errors InvalidRequestError Request is missing grant type. request request N/A N/A N/A N/A request grant_type client_credentials N/A N/A N/A N/A errors UnsupportedGrantTypeError request request N/A param N/A grant_type scope N/A N/A N/A param N/A request duplicate_params N/A N/A N/A N/A errors InvalidRequestError description N/A Duplicate %s parameter. param request request N/A N/A N/A log debug Authenticating client, %r. request N/A N/A N/A N/A N/A self request_validator authenticate_client request N/A N/A N/A N/A log debug Client authentication failed, %r. request N/A N/A N/A errors InvalidClientError request request N/A N/A N/A N/A hasattr N/A request client client_id N/A N/A N/A NotImplementedError Authenticate client must set the request.client.client_id attribute in authenticate_client. N/A N/A N/A self validate_grant_type request N/A N/A N/A log debug Authorizing access to user %r. N/A request user N/A N/A request client_id N/A N/A request client_id N/A N/A request client client_id N/A N/A N/A self validate_scopes request N/A N/A