Skip to content

Commit

Permalink
Merge pull request #37 from kidatsy/master
Browse files Browse the repository at this point in the history
Making DefaultController work with Symfony 2.3
  • Loading branch information
tmilos authored Jan 31, 2017
2 parents 79b329c + 4a7f771 commit 2cb00e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LightSaml/SpBundle/Controller/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function discoveryAction()
$parties = $this->get('lightsaml.container.build')->getPartyContainer()->getIdpEntityDescriptorStore()->all();

if (count($parties) == 1) {
return $this->redirectToRoute('lightsaml_sp.login', ['idp' => $parties[0]->getEntityID()]);
return $this->redirect($this->generateUrl('lightsaml_sp.login', ['idp' => $parties[0]->getEntityID()]));
}

return $this->render('LightSamlSpBundle::discovery.html.twig', [
Expand All @@ -44,7 +44,7 @@ public function loginAction(Request $request)
{
$idpEntityId = $request->get('idp');
if (null === $idpEntityId) {
return $this->redirectToRoute($this->container->getParameter('lightsaml_sp.route.discovery'));
return $this->redirect($this->generateUrl($this->container->getParameter('lightsaml_sp.route.discovery')));
}

$profile = $this->get('ligthsaml.profile.login_factory')->get($idpEntityId);
Expand Down

0 comments on commit 2cb00e7

Please sign in to comment.