/**
  * @group http
  * @test
  *
  * @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException
  */
 public function an_exception_is_thrown_when_the_request_is_signed_but_has_no_sigalg_parameter()
 {
     $request = m::mock('Symfony\\Component\\HttpFoundation\\Request');
     $request->shouldReceive('get')->with(AuthnRequest::PARAMETER_REQUEST)->andReturn('foo');
     $request->shouldReceive('get')->with(AuthnRequest::PARAMETER_SIGNATURE)->andReturn('somesignature');
     $request->shouldReceive('get')->with(AuthnRequest::PARAMETER_SIGNATURE_ALGORITHM)->andReturn();
     $this->redirectBinding->processRequest($request);
 }
 /**
  * @return \Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function initiateSamlRequest()
 {
     $authnRequest = AuthnRequestFactory::createNewRequest($this->serviceProvider, $this->identityProvider);
     $authnRequest->setAuthenticationContextClassRef((string) $this->requiredLoa);
     $this->sessionHandler->setRequestId($authnRequest->getRequestId());
     return $this->redirectBinding->createRedirectResponseFor($authnRequest);
 }
 /**
  * @return \Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function initiateSamlRequest()
 {
     $authnRequest = AuthnRequestFactory::createNewRequest($this->serviceProvider, $this->identityProvider);
     $this->stateHandler->setRequestId($authnRequest->getRequestId());
     return $this->redirectBinding->createRedirectResponseFor($authnRequest);
 }