def authorization_required(self):
        """
        .. versionadded:: 1.3.0

        This is a decorator for a view function. If the current user does not
        have an OAuth token, then they will be redirected to the
        :meth:`~flask_dance.consumer.oauth1.OAuth1ConsumerBlueprint.login`
        view to obtain one.
        """

        def wrapper(func):
            @wraps(func)
            def check_authorization(*args, **kwargs):
                if not self.authorized:
                    endpoint = "{name}.login".format(name=self.blueprint.name)
                    return redirect(url_for(endpoint))
                return func(*args, **kwargs)

            return check_authorization

        return wrapper