/** * @param SsoState $ssoState * @param Assertion $assertion * @param string $ownEntityId * @param string $partyEntityId * * @return \LightSaml\State\Sso\SsoSessionState[] */ protected function filterSessions(SsoState $ssoState, Assertion $assertion, $ownEntityId, $partyEntityId) { return $ssoState->filter($partyEntityId, $ownEntityId, $assertion->getSubject()->getNameID()->getValue(), $assertion->getSubject()->getNameID()->getFormat(), $assertion->getFirstAuthnStatement()->getSessionIndex()); }
/** * @param SsoState $ssoState * @param string $ownEntityId * * @return SsoSessionState|null */ protected function getIdpSession(SsoState $ssoState, $ownEntityId) { $idpSessions = $ssoState->filter(null, $ownEntityId, null, null, null); return array_shift($idpSessions); }