diff options
-rw-r--r-- | appinfo/routes.php | 5 | ||||
-rw-r--r-- | lib/SAMLSettings.php | 2 | ||||
-rw-r--r-- | tests/unit/AppInfo/RoutesTest.php | 5 |
3 files changed, 11 insertions, 1 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php index 7da99f9a..6e652175 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -29,6 +29,11 @@ return [ 'verb' => 'GET', ], [ + 'name' => 'SAML#base', + 'url' => '/saml', + 'verb' => 'GET', + ], + [ 'name' => 'SAML#getMetadata', 'url' => '/saml/metadata', 'verb' => 'GET', diff --git a/lib/SAMLSettings.php b/lib/SAMLSettings.php index be0f9ffc..58bd1299 100644 --- a/lib/SAMLSettings.php +++ b/lib/SAMLSettings.php @@ -101,7 +101,7 @@ class SAMLSettings { $settings = [ 'strict' => true, 'debug' => $this->config->getSystemValue('debug', false), - 'baseurl' => $this->request->getServerProtocol() . '://' . $this->request->getServerHost(), + 'baseurl' => $this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.base'), 'security' => [ 'nameIdEncrypted' => ($this->config->getAppValue('user_saml', $prefix . 'security-nameIdEncrypted', '0') === '1') ? true : false, 'authnRequestsSigned' => ($this->config->getAppValue('user_saml', $prefix . 'security-authnRequestsSigned', '0') === '1') ? true : false, diff --git a/tests/unit/AppInfo/RoutesTest.php b/tests/unit/AppInfo/RoutesTest.php index 5ca5ea64..b8efabac 100644 --- a/tests/unit/AppInfo/RoutesTest.php +++ b/tests/unit/AppInfo/RoutesTest.php @@ -35,6 +35,11 @@ class Test extends TestCase { 'verb' => 'GET', ], [ + 'name' => 'SAML#base', + 'url' => '/saml', + 'verb' => 'GET', + ], + [ 'name' => 'SAML#getMetadata', 'url' => '/saml/metadata', 'verb' => 'GET', |