public function onSessionClose(Session $session)
    {
        if ($session->getRealm() && $session->getRealm()->getRealmName() === 'thruway.auth') {
            // session is closing in the auth domain
            // check and see if there are any registrations that came from this session
            $sessionId = $session->getSessionId();

            foreach ($this->authMethods as $methodName => $method) {
                if (isset($method['session_id']) && $method['session_id'] === $sessionId) {
                    unset($this->authMethods[$methodName]);
                }
            }
        }
    }
public function onSessionClose(Session $session)
    {
        if ($session->getRealm() && $session->getRealm()->getRealmName() === 'thruway.auth') {
            // session is closing in the auth domain
            // check and see if there are any registrations that came from this session
            $sessionId = $session->getSessionId();

            foreach ($this->authMethods as $methodName => $method) {
                if (isset($method['session_id']) && $method['session_id'] === $sessionId) {
                    unset($this->authMethods[$methodName]);
                }
            }
        }
    }
public function onSessionClose ( Session $ session ) { if ( $ session -> getRealm ( ) && $ session -> getRealm ( ) -> getRealmName ( ) === 'thruway.auth' ) { // session is closing in the auth domain // check and see if there are any registrations that came from this session $ sessionId = $ session -> getSessionId ( ) ; foreach ( $ this -> authMethods as $ methodName => $ method ) { if ( isset ( $ method [ 'session_id' ] ) && $ method [ 'session_id' ] === $ sessionId ) { unset ( $ this -> authMethods [ $ methodName ] ) ; } } } }
This allows the AuthenticationManager to clean out auth methods that were registered by
sessions that are dieing. Otherwise the method could be hijacked by another client in the
thruway.auth realm.

@param \Thruway\Session $session
This allows the AuthenticationManager to clean out auth methods that were registered by sessions that are dieing . Otherwise the method could be hijacked by another client in the thruway . auth realm .