.. index:: single: open_id_logout
.. _open_id_logout/0:

.. rst-class:: right

**object**

``open_id_logout``
==================

RP-initiated logout URL helpers for OpenID Connect clients.

| **Availability:** 
|    ``logtalk_load(open_id(loader))``

| **Author:** Paulo Moura
| **Version:** 1:0:0
| **Date:** 2026-07-08

| **Compilation flags:**
|    ``static, context_switching_calls``


| **Imports:**
|    ``public`` :ref:`open_id_helpers <open_id_helpers/0>`
| **Uses:**
|    :ref:`list <list/0>`

| **Remarks:**
|    (none)

| **Inherited public predicates:**
|     :ref:`options_protocol/0::check_option/1`  :ref:`options_protocol/0::check_options/1`  :ref:`options_protocol/0::default_option/1`  :ref:`options_protocol/0::default_options/1`  :ref:`options_protocol/0::option/2`  :ref:`options_protocol/0::option/3`  :ref:`options_protocol/0::valid_option/1`  :ref:`options_protocol/0::valid_options/1`  

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

.. index:: logout_url/4
.. _open_id_logout/0::logout_url/4:

``logout_url/4``
^^^^^^^^^^^^^^^^

Builds a logout URL for an RP-initiated logout request.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``logout_url(Provider,Request,URL,Options)``
| **Mode and number of proofs:**
|    ``logout_url(+compound,+compound,-atom,+list(compound))`` - ``one_or_error``

| **Exceptions:**
|    ``Request`` is neither a direct options list nor a request wrapper term containing an options list:
|        ``domain_error(open_id_options,Request)``
|    ``Options`` is a variable or a partial list:
|        ``instantiation_error``
|    ``Options`` is neither a variable nor a list:
|        ``type_error(list,Options)``
|    An element ``Option`` of the list ``Options`` is neither a variable nor a compound term:
|        ``type_error(compound,Option)``
|    An element ``Option`` of the list ``Options`` is a compound term but not a valid option:
|        ``domain_error(option,Option)``
|    The provider metadata is missing an end-session endpoint:
|        ``domain_error(open_id_provider,missing(end_session_endpoint))``
|    A request value that must be an atom is not an atom:
|        ``type_error(atom,Value)``
|    A ``ui_locales`` value is neither an atom nor a list of atoms:
|        ``domain_error(open_id_space_separated_atom,Value)``
|    The ``post_logout_redirect_uri`` is not secure:
|        ``domain_error(open_id_post_logout_redirect_uri,URL)``


------------

Protected predicates
--------------------

(no local declarations; see entity ancestors if any)

Private predicates
------------------

(no local declarations; see entity ancestors if any)

Operators
---------

(none)

