'Authenticate the request, given the access token.
Overrides base class implementation to discard failure if user is
inactive.'

def authenticate_credentials(self, request, access_token):

    token = self.get_access_token(access_token)
    if (not token):
        raise AuthenticationFailed({u'error_code': OAUTH2_TOKEN_ERROR_NONEXISTENT, u'developer_message': u'The    provided    access    token    does    not    match    any    valid    tokens.'})
    elif (token.expires < django.utils.timezone.now()):
        raise AuthenticationFailed({u'error_code': OAUTH2_TOKEN_ERROR_EXPIRED, u'developer_message': u'The    provided    access    token    has    expired    and    is    no    longer    valid.'})
    else:
        return (token.user, token)
