SimpleSAML_IdP::handleLogoutRequest PHP Méthode

handleLogoutRequest() public méthode

This function will never return.
public handleLogoutRequest ( array &$state, string | null $assocId )
$state array
$assocId string | null The association we received the logout request from, or null if there was no association.
    public function handleLogoutRequest(array &$state, $assocId)
    {
        assert('isset($state["Responder"])');
        assert('is_string($assocId) || is_null($assocId)');
        $state['core:IdP'] = $this->id;
        $state['core:TerminatedAssocId'] = $assocId;
        if ($assocId !== null) {
            $this->terminateAssociation($assocId);
            $session = SimpleSAML_Session::getSessionFromRequest();
            $session->deleteData('core:idp-ssotime', $this->id . ':' . $state['saml:SPEntityId']);
        }
        // terminate the local session
        $id = SimpleSAML_Auth_State::saveState($state, 'core:Logout:afterbridge');
        $returnTo = SimpleSAML\Module::getModuleURL('core/idp/resumelogout.php', array('id' => $id));
        $this->authSource->logout($returnTo);
        $handler = $this->getLogoutHandler();
        $handler->startLogout($state, $assocId);
        assert('false');
    }

Usage Example

Exemple #1
0
 public static function receiveLogoutMessage(SimpleSAML_IdP $idp)
 {
     $state = array('Responder' => array('sspmod_adfs_IdP_ADFS', 'sendLogoutResponse'));
     //$spEntityId = NULL;
     //$assocId = 'adfs:' . $spEntityId;
     $assocId = NULL;
     // TODO: verify that this is really no problem for:
     //       a) SSP, because there's no caller SP...
     //       b) ADFS SP because caller will be called back...
     $idp->handleLogoutRequest($state, $assocId);
 }
All Usage Examples Of SimpleSAML_IdP::handleLogoutRequest