'If request is not permitted, determine what kind of exception to raise.'

def permission_denied(self, request, message=None):

    if (request.authenticators and (not request.successful_authenticator)):
        raise exceptions.NotAuthenticated()
    raise exceptions.PermissionDenied(detail=message)
