Release 2.0.35 (#4302)

This commit is contained in:
Kevin Papst
2023-09-23 18:15:22 +02:00
committed by GitHub
parent de419350b2
commit 7a5b12762a
122 changed files with 1555 additions and 2054 deletions

View File

@@ -25,7 +25,7 @@ final class SamlController extends AbstractController
}
#[Route(path: '/login', name: 'saml_login')]
public function loginAction(Request $request)
public function loginAction(Request $request): Response
{
if (!$this->samlConfiguration->isActivated()) {
throw $this->createNotFoundException('SAML deactivated');
@@ -50,11 +50,19 @@ final class SamlController extends AbstractController
throw new \RuntimeException($error);
}
$this->authFactory->create()->login($session->get('_security.main.target_path'));
// this does set headers and exit as $stay is not set to true
$url = $this->authFactory->create()->login($session->get('_security.main.target_path'));
if ($url === null) {
throw new \RuntimeException('SAML login failed');
}
// this line is not (yet) reached, as the previous call will exit
return $this->redirect($url);
}
#[Route(path: '/metadata', name: 'saml_metadata')]
public function metadataAction()
public function metadataAction(): Response
{
if (!$this->samlConfiguration->isActivated()) {
throw $this->createNotFoundException('SAML deactivated');
@@ -69,7 +77,7 @@ final class SamlController extends AbstractController
}
#[Route(path: '/acs', name: 'saml_acs')]
public function assertionConsumerServiceAction()
public function assertionConsumerServiceAction(): Response
{
if (!$this->samlConfiguration->isActivated()) {
throw $this->createNotFoundException('SAML deactivated');
@@ -79,7 +87,7 @@ final class SamlController extends AbstractController
}
#[Route(path: '/logout', name: 'saml_logout')]
public function logoutAction()
public function logoutAction(): Response
{
if (!$this->samlConfiguration->isActivated()) {
throw $this->createNotFoundException('SAML deactivated');