diff --git a/lib/SimpleSAML/Auth/Default.php b/lib/SimpleSAML/Auth/Default.php
index e3687bd954613ca23420cc360c5f9b4da64bca39..281b83f9219d9fd4d04fb91830da1169ae2fcdde 100644
--- a/lib/SimpleSAML/Auth/Default.php
+++ b/lib/SimpleSAML/Auth/Default.php
@@ -128,7 +128,7 @@ class SimpleSAML_Auth_Default {
 
 		if (is_string($return)) {
 			/* Redirect... */
-			SimpleSAML_Utilities::redirectTrustedURL($return);
+			\SimpleSAML\Utils\HTTP::redirectTrustedURL($return);
 		} else {
 			call_user_func($return, $state);
 			assert('FALSE');
@@ -193,7 +193,7 @@ class SimpleSAML_Auth_Default {
 		self::initLogoutReturn($returnURL, $authority);
 
 		/* Redirect... */
-		SimpleSAML_Utilities::redirectTrustedURL($returnURL);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($returnURL);
 	}
 
 
@@ -211,7 +211,7 @@ class SimpleSAML_Auth_Default {
 		$returnURL = $state['SimpleSAML_Auth_Default.ReturnURL'];
 
 		/* Redirect... */
-		SimpleSAML_Utilities::redirectTrustedURL($returnURL);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($returnURL);
 	}
 
 
diff --git a/lib/SimpleSAML/Auth/ProcessingChain.php b/lib/SimpleSAML/Auth/ProcessingChain.php
index da75fcc3f383c954aa5ab5318b8f18c7c19f9011..7f31063de9cdb98b032d105e347a0963f42eff88 100644
--- a/lib/SimpleSAML/Auth/ProcessingChain.php
+++ b/lib/SimpleSAML/Auth/ProcessingChain.php
@@ -247,7 +247,7 @@ class SimpleSAML_Auth_ProcessingChain {
 			 * in $state['ReturnURL'].
 			 */
 			$id = SimpleSAML_Auth_State::saveState($state, self::COMPLETED_STAGE);
-			SimpleSAML_Utilities::redirectTrustedURL($state['ReturnURL'], array(self::AUTHPARAM => $id));
+			\SimpleSAML\Utils\HTTP::redirectTrustedURL($state['ReturnURL'], array(self::AUTHPARAM => $id));
 		} else {
 			/* Pass the state to the function defined in $state['ReturnCall']. */
 
diff --git a/lib/SimpleSAML/Auth/Simple.php b/lib/SimpleSAML/Auth/Simple.php
index cc61e937b78bde3cfae3b1170e073c39cc0c9576..a82419f2ffbed1015c19b9026ad06b8e5823e09e 100644
--- a/lib/SimpleSAML/Auth/Simple.php
+++ b/lib/SimpleSAML/Auth/Simple.php
@@ -217,8 +217,7 @@ class SimpleSAML_Auth_Simple {
 				$stateID = SimpleSAML_Auth_State::saveState($state, $state['ReturnStateStage']);
 				$params[$state['ReturnStateParam']] = $stateID;
 			}
-
-			SimpleSAML_Utilities::redirectTrustedURL($state['ReturnTo'], $params);
+			\SimpleSAML\Utils\HTTP::redirectTrustedURL($state['ReturnTo'], $params);
 		}
 	}
 
diff --git a/lib/SimpleSAML/Auth/State.php b/lib/SimpleSAML/Auth/State.php
index f1461c471fcd908eeaa22f5d83251392468445fa..aed6b822f1c2759138fa419d1dac075cbb39f456 100644
--- a/lib/SimpleSAML/Auth/State.php
+++ b/lib/SimpleSAML/Auth/State.php
@@ -294,7 +294,7 @@ class SimpleSAML_Auth_State {
 			$id = self::saveState($state, self::EXCEPTION_STAGE);
 
 			/* Redirect to the exception handler. */
-			SimpleSAML_Utilities::redirectTrustedURL($state[self::EXCEPTION_HANDLER_URL], array(self::EXCEPTION_PARAM => $id));
+			\SimpleSAML\Utils\HTTP::redirectTrustedURL($state[self::EXCEPTION_HANDLER_URL], array(self::EXCEPTION_PARAM => $id));
 
 		} elseif (array_key_exists(self::EXCEPTION_HANDLER_FUNC, $state)) {
 			/* Call the exception handler. */
diff --git a/lib/SimpleSAML/IdP.php b/lib/SimpleSAML/IdP.php
index e5566b832dfc33b99487d2c79bd3587dd08d572f..7ba6193e9415024e45b8446c289107417a469532 100644
--- a/lib/SimpleSAML/IdP.php
+++ b/lib/SimpleSAML/IdP.php
@@ -531,7 +531,7 @@ class SimpleSAML_IdP {
 	public static function finishLogoutRedirect(SimpleSAML_IdP $idp, array $state) {
 		assert('isset($state["core:Logout:URL"])');
 
-		SimpleSAML_Utilities::redirectTrustedURL($state['core:Logout:URL']);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($state['core:Logout:URL']);
 		assert('FALSE');
 	}
 
diff --git a/lib/SimpleSAML/IdP/LogoutIFrame.php b/lib/SimpleSAML/IdP/LogoutIFrame.php
index 44c3b3d038a639b5b92efdd28519c2401f6697ed..e7fdc6e9562e353ab41459125081a6b077117aba 100644
--- a/lib/SimpleSAML/IdP/LogoutIFrame.php
+++ b/lib/SimpleSAML/IdP/LogoutIFrame.php
@@ -48,7 +48,7 @@ class SimpleSAML_IdP_LogoutIFrame extends SimpleSAML_IdP_LogoutHandler {
 		}
 
 		$url = SimpleSAML_Module::getModuleURL('core/idp/logout-iframe.php', $params);
-		SimpleSAML_Utilities::redirectTrustedURL($url);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url);
 	}
 
 
diff --git a/lib/SimpleSAML/IdP/LogoutTraditional.php b/lib/SimpleSAML/IdP/LogoutTraditional.php
index 4cd16dd860eab243baa0b0e5240f6ed11695c7db..7632cab053a8515a039d462ae3784e6558a7253e 100644
--- a/lib/SimpleSAML/IdP/LogoutTraditional.php
+++ b/lib/SimpleSAML/IdP/LogoutTraditional.php
@@ -29,7 +29,7 @@ class SimpleSAML_IdP_LogoutTraditional extends SimpleSAML_IdP_LogoutHandler {
 		try {
 			$idp = SimpleSAML_IdP::getByState($association);
 			$url = call_user_func(array($association['Handler'], 'getLogoutURL'), $idp, $association, $relayState);
-			SimpleSAML_Utilities::redirectTrustedURL($url);
+			\SimpleSAML\Utils\HTTP::redirectTrustedURL($url);
 		} catch (Exception $e) {
 			SimpleSAML_Logger::warning('Unable to initialize logout to ' . var_export($id, TRUE) . '.');
 			$this->idp->terminateAssociation($id);
diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php
index b8717e82f4f555506a458c8a621c4c7f1e1f9911..586f4cda5991f142fd8a25668c42c1438e3569a1 100644
--- a/lib/SimpleSAML/Utilities.php
+++ b/lib/SimpleSAML/Utilities.php
@@ -321,30 +321,10 @@ class SimpleSAML_Utilities {
 	}
 
 	/**
-	 * This function redirects to the specified URL without performing any security checks. Please, do NOT use this
-	 * function with user supplied URLs.
-	 *
-	 * This function will use the "HTTP 303 See Other" redirection if the current request used the POST method and the
-	 * HTTP version is 1.1. Otherwise, a "HTTP 302 Found" redirection will be used.
-	 *
-	 * The function will also generate a simple web page with a clickable  link to the target URL.
-	 *
-	 * @param string $url The URL we should redirect to. This URL may include query parameters. If this URL is a
-	 * relative URL (starting with '/'), then it will be turned into an absolute URL by prefixing it with the absolute
-	 * URL to the root of the website.
-	 * @param string[] $parameters An array with extra query string parameters which should be appended to the URL. The
-	 * name of the parameter is the array index. The value of the parameter is the value stored in the index. Both the
-	 * name and the value will be urlencoded. If the value is NULL, then the parameter will be encoded as just the
-	 * name, without a value.
-	 *
-	 * @return void This function never returns.
+	 * @deprecated This method will be removed in SSP 2.0. Please use SimpleSAML\Utils\HTTP::redirectTrustedURL() instead.
 	 */
 	public static function redirectTrustedURL($url, $parameters = array()) {
-		assert('is_string($url)');
-		assert('is_array($parameters)');
-
-		$url = self::normalizeURL($url);
-		self::_doRedirect($url, $parameters);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, $parameters);
 	}
 
 	/**
diff --git a/lib/SimpleSAML/Utils/HTTP.php b/lib/SimpleSAML/Utils/HTTP.php
index bffe910a0d4aa7343c09a6cb5dc1cdf50e13595b..81e2d451a0b04d3a3dbe2015fbcf614b9973ca9f 100644
--- a/lib/SimpleSAML/Utils/HTTP.php
+++ b/lib/SimpleSAML/Utils/HTTP.php
@@ -682,6 +682,39 @@ class HTTP
     }
 
 
+    /**
+     * This function redirects to the specified URL without performing any security checks. Please, do NOT use this
+     * function with user supplied URLs.
+     *
+     * This function will use the "HTTP 303 See Other" redirection if the current request used the POST method and the
+     * HTTP version is 1.1. Otherwise, a "HTTP 302 Found" redirection will be used.
+     *
+     * The function will also generate a simple web page with a clickable  link to the target URL.
+     *
+     * @param string   $url The URL we should redirect to. This URL may include query parameters. If this URL is a
+     * relative URL (starting with '/'), then it will be turned into an absolute URL by prefixing it with the absolute
+     * URL to the root of the website.
+     * @param string[] $parameters An array with extra query string parameters which should be appended to the URL. The
+     * name of the parameter is the array index. The value of the parameter is the value stored in the index. Both the
+     * name and the value will be urlencoded. If the value is NULL, then the parameter will be encoded as just the
+     * name, without a value.
+     *
+     * @return void This function never returns.
+     * @throws \SimpleSAML_Error_Exception If $url is not a string or $parameters is not an array.
+     *
+     * @author Jaime Perez, UNINETT AS <jaime.perez@uninett.no>
+     */
+    public static function redirectTrustedURL($url, $parameters = array())
+    {
+        if (!is_string($url) || !is_array($parameters)) {
+            throw new \SimpleSAML_Error_Exception('Invalid input parameters.');
+        }
+
+        $url = self::normalizeURL($url);
+        self::redirect($url, $parameters);
+    }
+
+
     /**
      * Resolve a (possibly) relative path from the given base path.
      *
diff --git a/lib/SimpleSAML/XHTML/IdPDisco.php b/lib/SimpleSAML/XHTML/IdPDisco.php
index f64dac92b431e7ac4c51da2dacf7eb4e2886f27b..75ae16d409d549a7ca3bee937f69940a4a3bbf87 100644
--- a/lib/SimpleSAML/XHTML/IdPDisco.php
+++ b/lib/SimpleSAML/XHTML/IdPDisco.php
@@ -462,8 +462,7 @@ class SimpleSAML_XHTML_IdPDisco {
 			$extDiscoveryStorage = $this->config->getString('idpdisco.extDiscoveryStorage', NULL);
 			if ($extDiscoveryStorage !== NULL) {
 				$this->log('Choice made [' . $idp . '] (Forwarding to external discovery storage)');
-				SimpleSAML_Utilities::redirectTrustedURL($extDiscoveryStorage, array(
-//					$this->returnIdParam => $idp,
+				\SimpleSAML\Utils\HTTP::redirectTrustedURL($extDiscoveryStorage, array(
 					'entityID' => $this->spEntityId,
 					'IdPentityID' => $idp,
 					'returnIDParam' => $this->returnIdParam,
@@ -473,7 +472,7 @@ class SimpleSAML_XHTML_IdPDisco {
 				
 			} else {
 				$this->log('Choice made [' . $idp . '] (Redirecting the user back. returnIDParam=' . $this->returnIdParam . ')');
-				SimpleSAML_Utilities::redirectTrustedURL($this->returnURL, array($this->returnIdParam => $idp));
+				\SimpleSAML\Utils\HTTP::redirectTrustedURL($this->returnURL, array($this->returnIdParam => $idp));
 			}
 			
 			return;
@@ -481,7 +480,7 @@ class SimpleSAML_XHTML_IdPDisco {
 		
 		if ($this->isPassive) {
 			$this->log('Choice not made. (Redirecting the user back without answer)');
-			SimpleSAML_Utilities::redirectTrustedURL($this->returnURL);
+			\SimpleSAML\Utils\HTTP::redirectTrustedURL($this->returnURL);
 			return;
 		}
 
@@ -495,12 +494,12 @@ class SimpleSAML_XHTML_IdPDisco {
 			$idpList = array_intersect_key($idpList, array_fill_keys($idpintersection, NULL));
 		}
 
-        $idpintersection = array_values($idpintersection); 
-        
-        if(sizeof($idpintersection)  == 1) {
-            $this->log('Choice made [' . $idpintersection[0] . '] (Redirecting the user back. returnIDParam=' . $this->returnIdParam . ')');
-            SimpleSAML_Utilities::redirectTrustedURL($this->returnURL, array($this->returnIdParam => $idpintersection[0]));
-        }
+		$idpintersection = array_values($idpintersection);
+
+		if(sizeof($idpintersection)  == 1) {
+			$this->log('Choice made [' . $idpintersection[0] . '] (Redirecting the user back. returnIDParam=' . $this->returnIdParam . ')');
+			\SimpleSAML\Utils\HTTP::redirectTrustedURL($this->returnURL, array($this->returnIdParam => $idpintersection[0]));
+		}
 
 		/*
 		 * Make use of an XHTML template to present the select IdP choice to the user.
diff --git a/modules/adfs/lib/IdP/ADFS.php b/modules/adfs/lib/IdP/ADFS.php
index 610f84baf39210639650fbb03af82f6a2ea4e258..62fd9200aab6ca8f8900a7457cf85c3c57e7ce68 100644
--- a/modules/adfs/lib/IdP/ADFS.php
+++ b/modules/adfs/lib/IdP/ADFS.php
@@ -168,7 +168,7 @@ class sspmod_adfs_IdP_ADFS {
 		// NB:: we don't know from which SP the logout request came from
 		$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
 		$idpMetadata = $idp->getConfig();
-		SimpleSAML_Utilities::redirectTrustedURL($idpMetadata->getValue('redirect-after-logout', \SimpleSAML\Utils\HTTP::getBaseURL()));
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($idpMetadata->getValue('redirect-after-logout', \SimpleSAML\Utils\HTTP::getBaseURL()));
 	}
 	
 	public static function receiveLogoutMessage(SimpleSAML_IdP $idp) {
diff --git a/modules/aselect/lib/Auth/Source/aselect.php b/modules/aselect/lib/Auth/Source/aselect.php
index fca98969368e70a8d2455ca5a0cc734a8484d195..f4fd0f601b8dcdc015fcc1f62c7afb59b19d9523 100644
--- a/modules/aselect/lib/Auth/Source/aselect.php
+++ b/modules/aselect/lib/Auth/Source/aselect.php
@@ -52,7 +52,7 @@ class sspmod_aselect_Auth_Source_aselect extends SimpleSAML_Auth_Source {
 			$app_url = SimpleSAML_Module::getModuleURL('aselect/credentials.php', array('ssp_state' => $id));
 			$as_url = $this->request_authentication($app_url);
 
-			SimpleSAML_Utilities::redirectTrustedURL($as_url);
+			\SimpleSAML\Utils\HTTP::redirectTrustedURL($as_url);
 		} catch(Exception $e) {
 			// attach the exception to the state
 			SimpleSAML_Auth_State::throwException($state, $e);
diff --git a/modules/authYubiKey/lib/Auth/Source/YubiKey.php b/modules/authYubiKey/lib/Auth/Source/YubiKey.php
index 48c3047ac8e41afe52cacc9eac12dccdeb147ef1..865ceef84bafafcf49834ecd2373c2c9d3f9bddd 100644
--- a/modules/authYubiKey/lib/Auth/Source/YubiKey.php
+++ b/modules/authYubiKey/lib/Auth/Source/YubiKey.php
@@ -103,7 +103,7 @@ class sspmod_authYubiKey_Auth_Source_YubiKey extends SimpleSAML_Auth_Source {
 		$id = SimpleSAML_Auth_State::saveState($state, self::STAGEID);
 
 		$url = SimpleSAML_Module::getModuleURL('authYubiKey/yubikeylogin.php');
-		SimpleSAML_Utilities::redirectTrustedURL($url, array('AuthState' => $id));
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('AuthState' => $id));
 	}
 	
 	
diff --git a/modules/authfacebook/lib/Auth/Source/Facebook.php b/modules/authfacebook/lib/Auth/Source/Facebook.php
index 7e6b9525e95554b3d73d4842ac74c241f30d5d33..c211ebc724eac82f18321ba4a3fdbb62777579b4 100644
--- a/modules/authfacebook/lib/Auth/Source/Facebook.php
+++ b/modules/authfacebook/lib/Auth/Source/Facebook.php
@@ -79,7 +79,7 @@ class sspmod_authfacebook_Auth_Source_Facebook extends SimpleSAML_Auth_Source {
 		$url = $facebook->getLoginUrl(array('redirect_uri' => $linkback, 'scope' => $this->req_perms));
 		SimpleSAML_Auth_State::saveState($state, self::STAGE_INIT);
 
-		SimpleSAML_Utilities::redirectTrustedURL($url);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url);
 	}
 		
 
diff --git a/modules/authorize/lib/Auth/Process/Authorize.php b/modules/authorize/lib/Auth/Process/Authorize.php
index 2fe62922c06a7c76e67c8ec600b85f4ade2a5bc0..d57f21c56f9c32be0f02bd4626cb0a624d1c2d7c 100644
--- a/modules/authorize/lib/Auth/Process/Authorize.php
+++ b/modules/authorize/lib/Auth/Process/Authorize.php
@@ -128,6 +128,6 @@ class sspmod_authorize_Auth_Process_Authorize extends SimpleSAML_Auth_Processing
 			'authorize:Authorize');
 		$url = SimpleSAML_Module::getModuleURL(
 			'authorize/authorize_403.php');
-		SimpleSAML_Utilities::redirectTrustedURL($url, array('StateId' => $id));
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('StateId' => $id));
 	}
 }
diff --git a/modules/authwindowslive/lib/Auth/Source/LiveID.php b/modules/authwindowslive/lib/Auth/Source/LiveID.php
index 47b41ba19ff5796daf6cf092c968827e1e3a37a8..27886940ceba45a3c2cda53ce111e0bb544f64ee 100644
--- a/modules/authwindowslive/lib/Auth/Source/LiveID.php
+++ b/modules/authwindowslive/lib/Auth/Source/LiveID.php
@@ -71,7 +71,7 @@ class sspmod_authwindowslive_Auth_Source_LiveID extends SimpleSAML_Auth_Source {
 				. '&wrap_scope=WL_Profiles.View,Messenger.SignIn'
 		;
 
-                SimpleSAML_Utilities::redirectTrustedURL($authorizeURL);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($authorizeURL);
 	}
 
 
diff --git a/modules/cas/lib/Auth/Source/CAS.php b/modules/cas/lib/Auth/Source/CAS.php
index 073eba6151279b3f8381ac4b41fdfdca8e8aadaf..301cb76ac930f9ecf50fb929a7dc28a6c6a4e5c0 100644
--- a/modules/cas/lib/Auth/Source/CAS.php
+++ b/modules/cas/lib/Auth/Source/CAS.php
@@ -205,7 +205,7 @@ class sspmod_cas_Auth_Source_CAS  extends SimpleSAML_Auth_Source  {
 
 		$serviceUrl = SimpleSAML_Module::getModuleURL('cas/linkback.php', array('stateID' => $stateID));
 
-		SimpleSAML_Utilities::redirectTrustedURL($this->_loginMethod, array(
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($this->_loginMethod, array(
 			'service' => $serviceUrl));
 	}
 
@@ -229,7 +229,7 @@ class sspmod_cas_Auth_Source_CAS  extends SimpleSAML_Auth_Source  {
 
 		SimpleSAML_Auth_State::deleteState($state);
 		// we want cas to log us out
-		SimpleSAML_Utilities::redirectTrustedURL($logoutUrl);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($logoutUrl);
 	}
 
 }
diff --git a/modules/casserver/www/login.php b/modules/casserver/www/login.php
index f660a98c9e539359d46a8f71c5bbbc5d4ac053d2..008018b924b0ea55ec1dfeede950956442e62099 100644
--- a/modules/casserver/www/login.php
+++ b/modules/casserver/www/login.php
@@ -48,8 +48,8 @@ storeTicket($ticket, $path, array('service' => $service,
 	'proxies' => array(),
 	'validbefore' => time() + 5));
 
-SimpleSAML_Utilities::redirectTrustedURL(
-    \SimpleSAML\Utils\HTTP::addURLParameters($service,
+\SimpleSAML\Utils\HTTP::redirectTrustedURL(
+	\SimpleSAML\Utils\HTTP::addURLParameters($service,
 		array('ticket' => $ticket)
 	)
 );
\ No newline at end of file
diff --git a/modules/cdc/lib/Server.php b/modules/cdc/lib/Server.php
index 890e4376ed95ca244135fde74135b6cc894383ee..b27f50ed2906cf2342f00f8b0c7eece57affa4d6 100644
--- a/modules/cdc/lib/Server.php
+++ b/modules/cdc/lib/Server.php
@@ -326,9 +326,9 @@ class sspmod_cdc_Server {
 
 		$url = \SimpleSAML\Utils\HTTP::addURLParameters($to, $params);
 		if (strlen($url) < 2048) {
-			SimpleSAML_Utilities::redirectTrustedURL($url);
+			\SimpleSAML\Utils\HTTP::redirectTrustedURL($url);
 		} else {
-            \SimpleSAML\Utils\HTTP::submitPOSTData($to, $params);
+			\SimpleSAML\Utils\HTTP::submitPOSTData($to, $params);
 		}
 	}
 
diff --git a/modules/consent/lib/Auth/Process/Consent.php b/modules/consent/lib/Auth/Process/Consent.php
index 051459aedf4fcd5d5d5092357ab6f717caf8a9f2..bbd585d7cd6dfbe1aec74dd28cb7a1eeb6799e8f 100644
--- a/modules/consent/lib/Auth/Process/Consent.php
+++ b/modules/consent/lib/Auth/Process/Consent.php
@@ -277,7 +277,7 @@ class sspmod_consent_Auth_Process_Consent extends SimpleSAML_Auth_ProcessingFilt
         // Save state and redirect
         $id  = SimpleSAML_Auth_State::saveState($state, 'consent:request');
         $url = SimpleSAML_Module::getModuleURL('consent/getconsent.php');
-        SimpleSAML_Utilities::redirectTrustedURL($url, array('StateId' => $id));
+        \SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('StateId' => $id));
     }
 
     /**
diff --git a/modules/consent/lib/Logout.php b/modules/consent/lib/Logout.php
index 89fc8d4c7fddd0e202214ae09b3c6adfdf3a601e..a927eac422611f3e220e5e3ca6d18df2d59acf1a 100644
--- a/modules/consent/lib/Logout.php
+++ b/modules/consent/lib/Logout.php
@@ -9,7 +9,7 @@ class sspmod_consent_Logout {
 
 	public static function postLogout(SimpleSAML_IdP $idp, array $state) {
 		$url = SimpleSAML_Module::getModuleURL('consent/logout_completed.php');
-		SimpleSAML_Utilities::redirectTrustedURL($url);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url);
 	}
 
 }
diff --git a/modules/core/lib/Auth/Process/WarnShortSSOInterval.php b/modules/core/lib/Auth/Process/WarnShortSSOInterval.php
index 1a731e3e641fb5c2f946ec1936687a7c75182d77..e28bfd4de4403e84eebd70bf2c695f89ae9cf844 100644
--- a/modules/core/lib/Auth/Process/WarnShortSSOInterval.php
+++ b/modules/core/lib/Auth/Process/WarnShortSSOInterval.php
@@ -46,7 +46,7 @@ class sspmod_core_Auth_Process_WarnShortSSOInterval extends SimpleSAML_Auth_Proc
 		/* Save state and redirect. */
 		$id = SimpleSAML_Auth_State::saveState($state, 'core:short_sso_interval');
 		$url = SimpleSAML_Module::getModuleURL('core/short_sso_interval.php');
-		SimpleSAML_Utilities::redirectTrustedURL($url, array('StateId' => $id));
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('StateId' => $id));
 	}
 
 }
diff --git a/modules/core/lib/Auth/UserPassBase.php b/modules/core/lib/Auth/UserPassBase.php
index a97fba73a3e92541326986e37755a116ab0c9b49..7c6b5dd09d6ecf0b636d08b12216659205c2eec1 100644
--- a/modules/core/lib/Auth/UserPassBase.php
+++ b/modules/core/lib/Auth/UserPassBase.php
@@ -194,7 +194,7 @@ abstract class sspmod_core_Auth_UserPassBase extends SimpleSAML_Auth_Source {
 		 */
 		$url = SimpleSAML_Module::getModuleURL('core/loginuserpass.php');
 		$params = array('AuthState' => $id);
-		SimpleSAML_Utilities::redirectTrustedURL($url, $params);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, $params);
 
 		/* The previous function never returns, so this code is never executed. */
 		assert('FALSE');
diff --git a/modules/core/lib/Auth/UserPassOrgBase.php b/modules/core/lib/Auth/UserPassOrgBase.php
index 7bbddf24fc3973c860b39060a888167568863f61..5058537f07962232bb8d9444c321d6f5377767cb 100644
--- a/modules/core/lib/Auth/UserPassOrgBase.php
+++ b/modules/core/lib/Auth/UserPassOrgBase.php
@@ -156,7 +156,7 @@ abstract class sspmod_core_Auth_UserPassOrgBase extends SimpleSAML_Auth_Source {
 
 		$url = SimpleSAML_Module::getModuleURL('core/loginuserpassorg.php');
 		$params = array('AuthState' => $id);
-		SimpleSAML_Utilities::redirectTrustedURL($url, $params);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, $params);
 	}
 
 
diff --git a/modules/core/www/as_login.php b/modules/core/www/as_login.php
index 27c16fa633ab5754b67030b531259fa08d813fa6..c4c7b7e7cc4821897c819deb5406ce29616e0048 100644
--- a/modules/core/www/as_login.php
+++ b/modules/core/www/as_login.php
@@ -32,4 +32,4 @@ if (!empty($_REQUEST['saml:idp'])) {
 $as = new SimpleSAML_Auth_Simple($_REQUEST['AuthId']);
 $as->requireAuth($options);
 
-SimpleSAML_Utilities::redirectTrustedURL($options['ReturnTo']);
+\SimpleSAML\Utils\HTTP::redirectTrustedURL($options['ReturnTo']);
diff --git a/modules/core/www/cleardiscochoices.php b/modules/core/www/cleardiscochoices.php
index 6a1b0729147d4952d5950284ea3b469f5e719098..fe0901bfea72e28b8a98f75ec472f45c15f4fa1d 100644
--- a/modules/core/www/cleardiscochoices.php
+++ b/modules/core/www/cleardiscochoices.php
@@ -33,5 +33,5 @@ if(array_key_exists('ReturnTo', $_REQUEST)) {
 }
 
 /* Redirect to destination. */
-SimpleSAML_Utilities::redirectTrustedURL($returnTo);
+\SimpleSAML\Utils\HTTP::redirectTrustedURL($returnTo);
 
diff --git a/modules/discopower/lib/PowerIdPDisco.php b/modules/discopower/lib/PowerIdPDisco.php
index cf673c4c9f1b0053224fcfffe7361a36190e19f0..44f481352319686f08e218d7696dca1a07394626 100644
--- a/modules/discopower/lib/PowerIdPDisco.php
+++ b/modules/discopower/lib/PowerIdPDisco.php
@@ -191,7 +191,7 @@ class sspmod_discopower_PowerIdPDisco extends SimpleSAML_XHTML_IdPDisco {
 			$extDiscoveryStorage = $this->config->getString('idpdisco.extDiscoveryStorage',NULL);
 			if ($extDiscoveryStorage !== NULL) {
 				$this->log('Choice made [' . $idp . '] (Forwarding to external discovery storage)');
-				SimpleSAML_Utilities::redirectTrustedURL($extDiscoveryStorage, array(
+				\SimpleSAML\Utils\HTTP::redirectTrustedURL($extDiscoveryStorage, array(
 					'entityID' => $this->spEntityId,
 					'IdPentityID' => $idp,
 					'returnIDParam' => $this->returnIdParam,
@@ -201,7 +201,7 @@ class sspmod_discopower_PowerIdPDisco extends SimpleSAML_XHTML_IdPDisco {
 				
 			} else {
 				$this->log('Choice made [' . $idp . '] (Redirecting the user back. returnIDParam=' . $this->returnIdParam . ')');
-				SimpleSAML_Utilities::redirectTrustedURL($this->returnURL, array($this->returnIdParam => $idp));
+				\SimpleSAML\Utils\HTTP::redirectTrustedURL($this->returnURL, array($this->returnIdParam => $idp));
 			}
 			
 			return;
@@ -209,7 +209,7 @@ class sspmod_discopower_PowerIdPDisco extends SimpleSAML_XHTML_IdPDisco {
 		
 		if ($this->isPassive) {
 			$this->log('Choice not made. (Redirecting the user back without answer)');
-			SimpleSAML_Utilities::redirectTrustedURL($this->returnURL);
+			\SimpleSAML\Utils\HTTP::redirectTrustedURL($this->returnURL);
 			return;
 		}
 
diff --git a/modules/exampleauth/lib/Auth/Process/RedirectTest.php b/modules/exampleauth/lib/Auth/Process/RedirectTest.php
index 79e5293e02673fdae333e5713db6b13774e1fd9e..28751cd2047c17a8b591ae9d7456588817c7ef74 100644
--- a/modules/exampleauth/lib/Auth/Process/RedirectTest.php
+++ b/modules/exampleauth/lib/Auth/Process/RedirectTest.php
@@ -22,7 +22,7 @@ class sspmod_exampleauth_Auth_Process_RedirectTest extends SimpleSAML_Auth_Proce
 		/* Save state and redirect. */
 		$id = SimpleSAML_Auth_State::saveState($state, 'exampleauth:redirectfilter-test');
 		$url = SimpleSAML_Module::getModuleURL('exampleauth/redirecttest.php');
-		SimpleSAML_Utilities::redirectTrustedURL($url, array('StateId' => $id));
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('StateId' => $id));
 	}
 
 }
diff --git a/modules/exampleauth/lib/Auth/Source/External.php b/modules/exampleauth/lib/Auth/Source/External.php
index 37038527b5a3fb0888ad0ec0d2c460409ad86ca2..22cc4e2d66e4acc0f59f14adb9221bdad33f3ffe 100644
--- a/modules/exampleauth/lib/Auth/Source/External.php
+++ b/modules/exampleauth/lib/Auth/Source/External.php
@@ -155,7 +155,7 @@ class sspmod_exampleauth_Auth_Source_External extends SimpleSAML_Auth_Source {
 		 * Note the 'ReturnTo' parameter. This must most likely be replaced with
 		 * the real name of the parameter for the login page.
 		 */
-		SimpleSAML_Utilities::redirectTrustedURL($authPage, array(
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($authPage, array(
 			'ReturnTo' => $returnTo,
 		));
 
diff --git a/modules/exampleauth/www/authpage.php b/modules/exampleauth/www/authpage.php
index 7b3dca26748ff1754560bef07f4fa7ad39440d0e..cf4c96cbae2ba3529274316109a362eb47ccb283 100644
--- a/modules/exampleauth/www/authpage.php
+++ b/modules/exampleauth/www/authpage.php
@@ -85,7 +85,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
 		$_SESSION['mail'] = $user['mail'];
 		$_SESSION['type'] = $user['type'];
 
-		SimpleSAML_Utilities::redirectTrustedURL($returnTo);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($returnTo);
 	}
 }
 
diff --git a/modules/expirycheck/lib/Auth/Process/ExpiryDate.php b/modules/expirycheck/lib/Auth/Process/ExpiryDate.php
index 1436f169e4cb99b64afc51d65b948061ac982cb9..9d04d763bc6f3f14f55909a7991d25dc8d104f91 100644
--- a/modules/expirycheck/lib/Auth/Process/ExpiryDate.php
+++ b/modules/expirycheck/lib/Auth/Process/ExpiryDate.php
@@ -134,12 +134,12 @@ class sspmod_expirycheck_Auth_Process_ExpiryDate extends SimpleSAML_Auth_Process
 			$state['netId'] = $netId;
 			$id = SimpleSAML_Auth_State::saveState($state, 'expirywarning:about2expire');
 			$url = SimpleSAML_Module::getModuleURL('expirycheck/about2expire.php');
-			SimpleSAML_Utilities::redirectTrustedURL($url, array('StateId' => $id));
+			\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('StateId' => $id));
 		}
 
 		if (!self::checkDate($expireOnDate)) {
 			SimpleSAML_Logger::error('expirycheck: NetID ' . $netId .
-			                         ' has expired [' . date($this->date_format, $expireOnDate) . ']. Access denied!');
+				' has expired [' . date($this->date_format, $expireOnDate) . ']. Access denied!');
 			$globalConfig = SimpleSAML_Configuration::getInstance();
 
 			/* Save state and redirect. */
@@ -147,7 +147,7 @@ class sspmod_expirycheck_Auth_Process_ExpiryDate extends SimpleSAML_Auth_Process
 			$state['netId'] = $netId;
 			$id = SimpleSAML_Auth_State::saveState($state, 'expirywarning:expired');
 			$url = SimpleSAML_Module::getModuleURL('expirycheck/expired.php');
-			SimpleSAML_Utilities::redirectTrustedURL($url, array('StateId' => $id));
+			\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('StateId' => $id));
 
 		}
 	}
diff --git a/modules/multiauth/lib/Auth/Source/MultiAuth.php b/modules/multiauth/lib/Auth/Source/MultiAuth.php
index 3e5b853a78eecceec1bb80ae10c5680369c72cc9..0235cdade95cad175eb7fb8bf7e6ad8205233305 100644
--- a/modules/multiauth/lib/Auth/Source/MultiAuth.php
+++ b/modules/multiauth/lib/Auth/Source/MultiAuth.php
@@ -120,7 +120,7 @@ class sspmod_multiauth_Auth_Source_MultiAuth extends SimpleSAML_Auth_Source {
 			$params['source'] = $_GET['source'];
 		}
 
-		SimpleSAML_Utilities::redirectTrustedURL($url, $params);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, $params);
 
 		/* The previous function never returns, so this code is never
 		executed */
diff --git a/modules/oauth/lib/Consumer.php b/modules/oauth/lib/Consumer.php
index 265b1cab906ea5dfc7ce712dacdfc163ec651e47..f17640cec973966e2430d0f4c8cb79c05ffb2c33 100644
--- a/modules/oauth/lib/Consumer.php
+++ b/modules/oauth/lib/Consumer.php
@@ -93,7 +93,7 @@ class sspmod_oauth_Consumer {
 		}
 		$authorizeURL = \SimpleSAML\Utils\HTTP::addURLParameters($url, $params);
 		if ($redirect) {
-			SimpleSAML_Utilities::redirectTrustedURL($authorizeURL);
+			\SimpleSAML\Utils\HTTP::redirectTrustedURL($authorizeURL);
 			exit;
 		}	
 		return $authorizeURL;
diff --git a/modules/oauth/www/authorize.php b/modules/oauth/www/authorize.php
index 9ff13dc3d0a48a1159d6782cac932bb2811e5dc9..d3ef8fabdb10a74278e97ea3ca29ad635f27aa5b 100644
--- a/modules/oauth/www/authorize.php
+++ b/modules/oauth/www/authorize.php
@@ -56,7 +56,7 @@ try {
 
 	if ($url) {
 		// If authorize() returns a URL, take user there (oauth1.0a)
-		SimpleSAML_Utilities::redirectTrustedURL($url);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url);
 	} 
 	else if (isset($_REQUEST['oauth_callback'])) {
 		// If callback was provided in the request (oauth1.0)
diff --git a/modules/preprodwarning/lib/Auth/Process/Warning.php b/modules/preprodwarning/lib/Auth/Process/Warning.php
index 1c734091e2440c5802c94751c8b71644b985a3d7..acb740c2ba818b521f5bb2955db2737a4b811ed8 100644
--- a/modules/preprodwarning/lib/Auth/Process/Warning.php
+++ b/modules/preprodwarning/lib/Auth/Process/Warning.php
@@ -28,7 +28,7 @@ class sspmod_preprodwarning_Auth_Process_Warning extends SimpleSAML_Auth_Process
 		/* Save state and redirect. */
 		$id = SimpleSAML_Auth_State::saveState($state, 'warning:request');
 		$url = SimpleSAML_Module::getModuleURL('preprodwarning/showwarning.php');
-		SimpleSAML_Utilities::redirectTrustedURL($url, array('StateId' => $id));
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('StateId' => $id));
 	}
 	
 
diff --git a/modules/saml/lib/Auth/Process/ExpectedAuthnContextClassRef.php b/modules/saml/lib/Auth/Process/ExpectedAuthnContextClassRef.php
index 13daccd8f9dd8d7779be4c83e56d17e63b4a8344..c012a85e1775275047372ce6688e2effab3cdf38 100644
--- a/modules/saml/lib/Auth/Process/ExpectedAuthnContextClassRef.php
+++ b/modules/saml/lib/Auth/Process/ExpectedAuthnContextClassRef.php
@@ -79,6 +79,6 @@ class sspmod_saml_Auth_Process_ExpectedAuthnContextClassRef extends SimpleSAML_A
 		$id = SimpleSAML_Auth_State::saveState($request, 'saml:ExpectedAuthnContextClassRef:unauthorized');
 		$url = SimpleSAML_Module::getModuleURL(
 			'saml/sp/wrong_authncontextclassref.php');
-		SimpleSAML_Utilities::redirectTrustedURL($url, array('StateId' => $id));
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('StateId' => $id));
 	}
 }
diff --git a/modules/saml/lib/Auth/Source/SP.php b/modules/saml/lib/Auth/Source/SP.php
index 0823d5bbe037d9e6f0683585d4c61b229618ec09..e5140681ef8b4bf475e17aa2c1364abb6d4025bc 100644
--- a/modules/saml/lib/Auth/Source/SP.php
+++ b/modules/saml/lib/Auth/Source/SP.php
@@ -168,7 +168,7 @@ class sspmod_saml_Auth_Source_SP extends SimpleSAML_Auth_Source {
 
 		SimpleSAML_Logger::debug('Starting SAML 1 SSO to ' . var_export($idpEntityId, TRUE) .
 			' from ' . var_export($this->entityId, TRUE) . '.');
-		SimpleSAML_Utilities::redirectTrustedURL($url);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url);
 	}
 
 
@@ -355,7 +355,7 @@ class sspmod_saml_Auth_Source_SP extends SimpleSAML_Auth_Source {
 			$params['isPassive'] = 'true';
 		}
 
-		SimpleSAML_Utilities::redirectTrustedURL($discoURL, $params);
+		\SimpleSAML\Utils\HTTP::redirectTrustedURL($discoURL, $params);
 	}
 
 
diff --git a/modules/saml/www/sp/saml2-acs.php b/modules/saml/www/sp/saml2-acs.php
index 21bdce2561feb4782590d494d3182ac752352aec..7ab671ed96184545dbf25fce12ea6480ede0807a 100644
--- a/modules/saml/www/sp/saml2-acs.php
+++ b/modules/saml/www/sp/saml2-acs.php
@@ -60,7 +60,7 @@ if ($prevAuth !== NULL && $prevAuth['id'] === $response->getId() && $prevAuth['i
 	 * instead of displaying a confusing error message.
 	 */
 	SimpleSAML_Logger::info('Duplicate SAML 2 response detected - ignoring the response and redirecting the user to the correct page.');
-	SimpleSAML_Utilities::redirectTrustedURL($prevAuth['redirect']);
+	\SimpleSAML\Utils\HTTP::redirectTrustedURL($prevAuth['redirect']);
 }
 
 $idpMetadata = array();
diff --git a/www/authmemcookie.php b/www/authmemcookie.php
index 96e318ca428763be384758930dccc48075a11b81..b6a1f92b20a36ec4ed54db8f6fadb56c5ac03890 100644
--- a/www/authmemcookie.php
+++ b/www/authmemcookie.php
@@ -93,7 +93,7 @@ try {
 	$session->registerLogoutHandler($sourceId, 'SimpleSAML_AuthMemCookie', 'logoutHandler');
 
 	/* Redirect the user back to this page to signal that the login is completed. */
-	SimpleSAML_Utilities::redirectTrustedURL(\SimpleSAML\Utils\HTTP::getSelfURL());
+	\SimpleSAML\Utils\HTTP::redirectTrustedURL(\SimpleSAML\Utils\HTTP::getSelfURL());
 } catch(Exception $e) {
 	throw new SimpleSAML_Error_Error('CONFIG', $e);
 }
diff --git a/www/errorreport.php b/www/errorreport.php
index 3e92b1804e160bef5ad58e1bd387bd824bc5b67c..042f9a6131aad598a90f4795d67e938bfea19f23 100644
--- a/www/errorreport.php
+++ b/www/errorreport.php
@@ -99,4 +99,4 @@ if ($config->getBoolean('errorreporting', TRUE) && $toAddress !== 'na@example.or
 }
 
 /* Redirect the user back to this page to clear the POST request. */
-SimpleSAML_Utilities::redirectTrustedURL(\SimpleSAML\Utils\HTTP::getSelfURLNoQuery());
+\SimpleSAML\Utils\HTTP::redirectTrustedURL(\SimpleSAML\Utils\HTTP::getSelfURLNoQuery());
diff --git a/www/index.php b/www/index.php
index 4ca3a3baa488451210fb51735c233a2db13bb782..5d3134049ba061d55de855a8d0b479ac7c35bad1 100644
--- a/www/index.php
+++ b/www/index.php
@@ -2,5 +2,4 @@
 
 require_once('_include.php');
 
-
-SimpleSAML_Utilities::redirectTrustedURL(SimpleSAML_Module::getModuleURL('core/frontpage_welcome.php'));
+\SimpleSAML\Utils\HTTP::redirectTrustedURL(SimpleSAML_Module::getModuleURL('core/frontpage_welcome.php'));