public function consumeAssertionAction()
 {
     $this->setNoRender();
     $application = EngineBlock_ApplicationSingleton::getInstance();
     $proxyServer = new EngineBlock_Corto_Adapter();
     try {
         $proxyServer->consumeAssertion();
     } catch (EngineBlock_Corto_Exception_UserNotMember $e) {
         $application->getLogInstance()->notice("VO membership required", array('exception' => $e));
         $application->handleExceptionWithFeedback($e, '/authentication/feedback/vomembershiprequired');
     } catch (EngineBlock_Corto_Exception_PEPNoAccess $e) {
         $application->getLogInstance()->notice("PEP authorization rule violation", array('exception' => $e));
         $application->handleExceptionWithFeedback($e, '/authentication/feedback/authorization-policy-violation', array("error_authorization_policy_violation_name" => $e->getMessage()));
     } catch (EngineBlock_Corto_Module_Services_SessionLostException $e) {
         $application->getLogInstance()->notice("Session Lost", array('exception' => $e));
         $application->handleExceptionWithFeedback($e, '/authentication/feedback/session-lost');
     } catch (EngineBlock_Corto_Module_Bindings_UnableToReceiveMessageException $e) {
         $application->getLogInstance()->notice("Unable to receive message", array('exception' => $e));
         $application->handleExceptionWithFeedback($e, '/authentication/feedback/unable-to-receive-message');
     } catch (EngineBlock_Corto_Exception_UnknownIssuer $e) {
         $application->getLogInstance()->notice("Unknown Issuer", array('exception' => $e));
         $application->handleExceptionWithFeedback($e, '/authentication/feedback/unknown-issuer?entity-id=' . urlencode($e->getEntityId()) . '&destination=' . urlencode($e->getDestination()));
     } catch (EngineBlock_Corto_Exception_MissingRequiredFields $e) {
         $application->getLogInstance()->notice("Missing Required Fields", array('exception' => $e));
         $application->handleExceptionWithFeedback($e, '/authentication/feedback/missing-required-fields');
     } catch (EngineBlock_Attributes_Manipulator_CustomException $e) {
         $_SESSION['feedback_custom'] = $e->getFeedback();
         $application->handleExceptionWithFeedback($e, '/authentication/feedback/custom');
     } catch (EngineBlock_Corto_Module_Bindings_UnsupportedBindingException $e) {
         $application->getLogInstance()->notice("Unsupported Binding", array('exception' => $e));
         $application->handleExceptionWithFeedback($e, '/authentication/feedback/invalid-acs-binding');
     } catch (EngineBlock_Corto_Exception_ReceivedErrorStatusCode $e) {
         // Add extra feedback info
         $application->getLogInstance()->notice("Received Error Status Code", array('exception' => $e));
         $application->handleExceptionWithFeedback($e, '/authentication/feedback/received-error-status-code', $e->getFeedbackInfo());
     } catch (EngineBlock_Corto_Module_Bindings_SignatureVerificationException $e) {
         $application->getLogInstance()->warning("Unable to verify signature, cert wrong?", array('exception' => $e));
         $application->handleExceptionWithFeedback($e, '/authentication/feedback/received-invalid-signed-response');
     } catch (EngineBlock_Corto_Module_Bindings_VerificationException $e) {
         $application->getLogInstance()->notice("Unable to verify message", array('exception' => $e));
         $application->handleExceptionWithFeedback($e, '/authentication/feedback/received-invalid-response');
     } catch (EngineBlock_Exception_DissimilarServiceProviderWorkflowStates $e) {
         $application->getLogInstance()->notice("Dissimilar Service Provider workflowstates in request chain (transparant proxying)", array('exception' => $e));
         $application->handleExceptionWithFeedback($e, '/authentication/feedback/dissimilar-workflow-states');
     }
 }
 public function consumeAssertionAction()
 {
     $this->setNoRender();
     $application = EngineBlock_ApplicationSingleton::getInstance();
     $proxyServer = new EngineBlock_Corto_Adapter();
     try {
         $proxyServer->consumeAssertion();
     } catch (EngineBlock_Corto_Exception_UserNotMember $e) {
         $application->getLogInstance()->warn('User not a member error');
         $application->getHttpResponse()->setRedirectUrl('/authentication/feedback/vomembershiprequired');
     } catch (Corto_Module_Bindings_UnableToReceiveMessageException $e) {
         $application->getLogInstance()->warn('Unable to receive message error');
         $application->getHttpResponse()->setRedirectUrl('/authentication/feedback/unable-to-receive-message');
     } catch (EngineBlock_Corto_Exception_UnknownIssuer $e) {
         $additionalInfo = new EngineBlock_Log_Message_AdditionalInfo(null, $e->getDestination(), $e->getEntityId(), $e->getTraceAsString());
         $application->getLogInstance()->err($e->getMessage(), $additionalInfo);
         $application->getHttpResponse()->setRedirectUrl('/authentication/feedback/unknown-issuer?entity-id=' . urlencode($e->getEntityId()) . '&destination=' . urlencode($e->getDestination()));
     } catch (EngineBlock_Corto_Exception_MissingRequiredFields $e) {
         $additionalInfo = new EngineBlock_Log_Message_AdditionalInfo(null, null, null, $e->getTraceAsString());
         $application->getLogInstance()->error($e->getMessage(), $additionalInfo);
         $application->getHttpResponse()->setRedirectUrl('/authentication/feedback/missing-required-fields');
     }
 }