Skip to content
Snippets Groups Projects
Commit 17e63ab1 authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Stop using the deprecated SimpleSAML_Configuration::getBaseURL() method.

parent dd60fe75
No related branches found
No related tags found
No related merge requests found
......@@ -98,8 +98,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandler
$config = SimpleSAML_Configuration::getInstance();
assert($config instanceof SimpleSAML_Configuration);
$baseurl = \SimpleSAML\Utils\HTTP::getSelfURLHost().'/'.
$config->getBaseURL();
$baseurl = \SimpleSAML\Utils\HTTP::getSelfURLHost().$config->getBasePath();
if ($set == 'saml20-sp-hosted') {
if ($property === 'SingleLogoutServiceBinding') {
......
......@@ -318,7 +318,7 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler
$ret['path'] = $config->getBoolean(
'session.phpsession.limitedpath',
false
) ? '/'.$config->getBaseURL() : '/';
) ? $config->getBasePath() : '/';
}
$ret['httponly'] = $config->getBoolean('session.phpsession.httponly', true);
......
......@@ -581,7 +581,7 @@ class HTTP
$hostname = self::getServerHost();
$port = self::getServerPort();
$path = '/'.$globalConfig->getBaseURL();
$path = $globalConfig->getBasePath();
return $protocol.$hostname.$port.$path;
} else {
......
......@@ -50,7 +50,8 @@ class SimpleSAML_XHTML_Template
{
$this->configuration = $configuration;
$this->template = $template;
$this->data['baseurlpath'] = $this->configuration->getBaseURL();
// TODO: do not remove the slash from the beginning, change the templates instead!
$this->data['baseurlpath'] = ltrim($this->configuration->getBasePath(), '/');
$this->translator = new SimpleSAML\Locale\Translate($configuration, $defaultDictionary);
}
......
......@@ -268,7 +268,7 @@ class sspmod_consent_Consent_Store_Cookie extends sspmod_consent_Store
$globalConfig = SimpleSAML_Configuration::getInstance();
$params = array(
'lifetime' => (90*24*60*60),
'path' => ('/' . $globalConfig->getBaseURL()),
'path' => ($globalConfig->getBasePath()),
'httponly' => FALSE,
);
......
......@@ -14,7 +14,7 @@ $asId = (string) $_REQUEST['as'];
$as = new SimpleSAML_Auth_Simple($asId);
if (array_key_exists('logout', $_REQUEST)) {
$as->logout('/'.$config->getBaseURL().'logout.php');
$as->logout($config->getBasePath().'logout.php');
}
if (array_key_exists(SimpleSAML_Auth_State::EXCEPTION_PARAM, $_REQUEST)) {
......
......@@ -78,7 +78,7 @@ if ($isadmin) {
if ($config->getBoolean('enable.saml20-idp', FALSE) === true) {
try {
$metaentries['hosted']['saml20-idp'] = $metadata->getMetaDataCurrent('saml20-idp-hosted');
$metaentries['hosted']['saml20-idp']['metadata-url'] = '/' . $config->getBaseURL() .
$metaentries['hosted']['saml20-idp']['metadata-url'] = $config->getBasePath() .
'saml2/idp/metadata.php?output=xhtml';
if ($isadmin)
$metaentries['remote']['saml20-sp-remote'] = $metadata->getList('saml20-sp-remote');
......@@ -87,7 +87,7 @@ if ($config->getBoolean('enable.saml20-idp', FALSE) === true) {
if ($config->getBoolean('enable.shib13-idp', FALSE) === true) {
try {
$metaentries['hosted']['shib13-idp'] = $metadata->getMetaDataCurrent('shib13-idp-hosted');
$metaentries['hosted']['shib13-idp']['metadata-url'] = '/' . $config->getBaseURL() .
$metaentries['hosted']['shib13-idp']['metadata-url'] = $config->getBasePath() .
'shib13/idp/metadata.php?output=xhtml';
if ($isadmin)
$metaentries['remote']['shib13-sp-remote'] = $metadata->getList('shib13-sp-remote');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment