def _require_auth(fnc):
    @wraps(fnc)
    @_assure_identity
    def _wrapped(*args, **kwargs):
        if not identity.authenticated:
            msg = "Authentication required before calling '%s'." % fnc.__name__
            raise exc.NotAuthenticated(msg)
        return fnc(*args, **kwargs)
    return _wrapped
Authentication decorator.
dataset/ETHPy150Open rackspace/pyrax/pyrax/__init__.py/_require_auth