public function getRedirectUrl($returnTo = null)
    {
        $settings = $this->auth->getSettings();
        $authnRequest = new OneLogin_Saml2_AuthnRequest($settings);
        $parameters = array('SAMLRequest' => $authnRequest->getRequest());
        if (!empty($returnTo)) {
            $parameters['RelayState'] = $returnTo;
        } else {
            $parameters['RelayState'] = OneLogin_Saml2_Utils::getSelfRoutedURLNoQuery();
        }
        $url = OneLogin_Saml2_Utils::redirect($this->auth->getSSOurl(), $parameters, true);
        return $url;
    }
public function getRedirectUrl($returnTo = null)
    {
        $settings = $this->auth->getSettings();
        $authnRequest = new OneLogin_Saml2_AuthnRequest($settings);
        $parameters = array('SAMLRequest' => $authnRequest->getRequest());
        if (!empty($returnTo)) {
            $parameters['RelayState'] = $returnTo;
        } else {
            $parameters['RelayState'] = OneLogin_Saml2_Utils::getSelfRoutedURLNoQuery();
        }
        $url = OneLogin_Saml2_Utils::redirect($this->auth->getSSOurl(), $parameters, true);
        return $url;
    }
public function getRedirectUrl ( $ returnTo = null ) { $ settings = $ this -> auth -> getSettings ( ) ; $ authnRequest = new OneLogin_Saml2_AuthnRequest ( $ settings ) ; $ parameters = array ( 'SAMLRequest' => $ authnRequest -> getRequest ( ) ) ; if ( ! empty ( $ returnTo ) ) { $ parameters [ 'RelayState' ] = $ returnTo ; } else { $ parameters [ 'RelayState' ] = OneLogin_Saml2_Utils :: getSelfRoutedURLNoQuery ( ) ; } $ url = OneLogin_Saml2_Utils :: redirect ( $ this -> auth -> getSSOurl ( ) , $ parameters , true ) ; return $ url ; }
Obtains the SSO URL containing the AuthRequest
message deflated.

@param string|null $returnTo

@return string

@throws OneLogin_Saml2_Error
Obtains the SSO URL containing the AuthRequest message deflated .