Ejemplo n.º 1
0
 /**
  * @param ProfileContext $context
  *
  * @return void
  */
 public function doExecute(ProfileContext $context)
 {
     $binding = $this->bindingFactory->create($context->getEndpoint()->getBinding());
     $outboundContext = $context->getOutboundContext();
     $context->getHttpResponseContext()->setResponse($binding->send($outboundContext));
     $this->logger->info('Sending message', LogHelper::getActionContext($context, $this, array('message' => $outboundContext->getSerializationContext()->getDocument()->saveXML())));
 }
Ejemplo n.º 2
0
 /**
  * @param ProfileContext $context
  *
  * @return void
  */
 protected function doExecute(ProfileContext $context)
 {
     $bindingType = $this->bindingFactory->detectBindingType($context->getHttpRequest());
     if (null == $bindingType) {
         $message = 'Unable to resolve binding type, invalid or unsupported http request';
         $this->logger->critical($message, LogHelper::getActionErrorContext($context, $this));
         throw new LightSamlBindingException($message);
     }
     $this->logger->debug(sprintf('Detected binding type: %s', $bindingType), LogHelper::getActionContext($context, $this));
     $binding = $this->bindingFactory->create($bindingType);
     $binding->receive($context->getHttpRequest(), $context->getInboundContext());
     $context->getInboundContext()->setBindingType($bindingType);
     $this->logger->info('Received message', LogHelper::getActionContext($context, $this, array('message' => $context->getInboundContext()->getDeserializationContext()->getDocument()->saveXML())));
 }