def METHOD_NAME(self):
    """
    Generate and return the value for an OAuth 2 state param.
    :rtype: str
    """
    request = self.context["request"]
    csrf = secrets.token_hex()
    data = {
        "user": self._lti_user_service.serialize(request.lti_user),
        "csrf": csrf,
    }
    jwt_str = self._jwt_service.encode_with_secret(
        data, self._secret, lifetime=timedelta(hours=1)
    )
    request.session["oauth2_csrf"] = csrf
    return jwt_str