'django-oauth-toolkit expects certain non-standard attributes to
be present on the request object.  This function modifies the
request object to match these expectations'

def _populate_create_access_token_request(self, request, user, scope, client):

    request.user = user
    request.scopes = [SCOPE_VALUE_DICT[scope]]
    request.client = client
    request.state = None
    request.refresh_token = None
    request.extra_credentials = None
    request.grant_type = client.authorization_grant_type
