1<?php
2
3namespace SimpleSAML\IdP;
4
5/**
6 * Interface that all logout handlers must implement.
7 *
8 * @package SimpleSAMLphp
9 */
10interface LogoutHandlerInterface
11{
12
13
14    /**
15     * Initialize this logout handler.
16     *
17     * @param \SimpleSAML_IdP $idp The IdP we are logging out from.
18     */
19    public function __construct(\SimpleSAML_IdP $idp);
20
21
22    /**
23     * Start a logout operation.
24     *
25     * This function must never return.
26     *
27     * @param array &$state The logout state.
28     * @param string|null $assocId The association that started the logout.
29     */
30    public function startLogout(array &$state, $assocId);
31
32
33    /**
34     * Handles responses to our logout requests.
35     *
36     * This function will never return.
37     *
38     * @param string $assocId The association that is terminated.
39     * @param string|null $relayState The RelayState from the start of the logout.
40     * @param \SimpleSAML_Error_Exception|null $error The error that occurred during session termination (if any).
41     */
42    public function onResponse($assocId, $relayState, \SimpleSAML_Error_Exception $error = null);
43}
44