Thruway\Authentication\AuthenticationManager::onSessionClose PHP Метод

onSessionClose() публичный Метод

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.
public onSessionClose ( Session $session )
$session Thruway\Session
    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]);
                }
            }
        }
    }