Ejemplo n.º 1
0
 /**
  * @param ProfileContext $context
  */
 protected function doExecute(ProfileContext $context)
 {
     $message = MessageContextHelper::asSamlMessage($context->getOutboundContext());
     $state = new RequestState();
     $state->setId($message->getID());
     $state->setNonce($message);
     $this->requestStore->set($state);
 }
Ejemplo n.º 2
0
 /**
  * @param ProfileContext $context
  */
 protected function doExecute(ProfileContext $context)
 {
     $message = MessageContextHelper::asSamlMessage($context->getOutboundContext());
     $state = new RequestState();
     $state->setId($message->getID());
     $partyEntityId = $context->getPartyEntityContext() ? $context->getPartyEntityContext()->getEntityId() : '';
     if ($context->getPartyEntityContext() && $context->getPartyEntityContext()->getEntityDescriptor()) {
         $partyEntityId = $context->getPartyEntityContext()->getEntityDescriptor()->getEntityID();
     }
     $state->getParameters()->add([RequestStateParameters::ID => $message->getID(), RequestStateParameters::TYPE => get_class($message), RequestStateParameters::TIMESTAMP => $message->getIssueInstantTimestamp(), RequestStateParameters::PARTY => $partyEntityId, RequestStateParameters::RELAY_STATE => $message->getRelayState()]);
     if ($message instanceof LogoutRequest) {
         $state->getParameters()->add([RequestStateParameters::NAME_ID => $message->getNameID()->getValue(), RequestStateParameters::NAME_ID_FORMAT => $message->getNameID()->getFormat(), RequestStateParameters::SESSION_INDEX => $message->getSessionIndex()]);
     }
     $this->requestStore->set($state);
 }