Maestrano Single Sign-On processing URL

@return string url
496460
public function getIdpUrl() {
        $host = Maestrano::with($this->_preset)->param('sso.idp');
        $api_base = Maestrano::with($this->_preset)->param('api.base');
        $endpoint = 'auth/saml';
        return "${host}${api_base}${endpoint}";
    }
1251336
public static function logout_url()
    {
        $logoutUrl = Controller::join_links(Director::baseURL(), self::config()->get('logout_url'));
        return SecurityToken::inst()->addToUrl($logoutUrl);
    }
170884
protected function getCurrentUrl()
    {
        $filters = array(
            'HTTPS'                  => FILTER_VALIDATE_BOOLEAN,
            'HTTP_SSL_HTTPS'         => FILTER_VALIDATE_BOOLEAN,
            'HTTP_X_FORWARDED_PROTO' => FILTER_SANITIZE_STRING,
            'HTTP_HOST'              => FILTER_SANITIZE_STRING,
            'REQUEST_URI'            => FILTER_SANITIZE_STRING,
        );
        // FastCGI seems to cause strange side-effects with unexpected NULL values when using INPUT_SERVER and
        // INPUT_ENV with the filter_input() and filter_input_array() functions, so we're using a workaround there.
        // See: http://fr2.php.net/manual/en/function.filter-input.php#77307
        if (PHP_SAPI === 'cgi-fcgi')
        {
            $values = $filters;
            array_walk($values, function (&$value, $key) { $value = isset($_SERVER[$key]) ? $_SERVER[$key] : null; });
            $values = filter_var_array($values, $filters);
        }
        else
        {
            $values = filter_input_array(INPUT_SERVER, $filters);
        }
        $secure = ($values['HTTPS'] || $values['HTTP_SSL_HTTPS'] || (strtolower($values['HTTP_X_FORWARDED_PROTO']) === 'https'));
        $scheme = $secure ? 'https://' : 'http://';

        $currentUrl = $scheme . $values['HTTP_HOST'] . $values['REQUEST_URI'];
        $parts      = parse_url($currentUrl);

        // Remove OAuth callback params
        $query = null;
        if (!empty($parts['query']))
        {
            $parameters = array();
            parse_str($parts['query'], $parameters);

            foreach(self::$DROP_QUERY_PARAMS as $name)
            {
                unset($parameters[$name]);
            }
            if (count($parameters) > 0)
            {
                $query = '?' . http_build_query($parameters, null, '&');
            }
        }
        // Use port if non default
        $port = (!empty($parts['port']) && (($secure) ? ($parts['port'] !== 80) : ($parts['port'] !== 443)))
            ? ":{$parts['port']}"
            : null;

        // Rebuild
        return $scheme . $parts['host'] . $port . $parts['path'] . $query;
    }
494667
public function url()
    {
        $parameters = [
            'id'    => $this->userToken->getUserId(),
            'token' => $this->userToken->getToken(),
        ];

        $url = $this->urlGenerator->generate(
            'reset-password',
            $parameters,
            UrlGenerator::ABSOLUTE_URL
        );

        return $url;
    }
673444
public function getAuthenticationUrl()
    {
        $params = [
            'client_id' => $this->clientId,
            'scope' => $this->scopes,
            'state' => $this->state,
            'response_type' => 'code',
            'redirect_uri' => $this->redirectUrl,
        ];

        return 'https://medium.com/m/oauth/authorize?' . http_build_query($params);
    }
1268282
public function url(): string
    {
        //find a module providing the place hierarchy
        $module = app(ModuleService::class)
            ->findByComponent(ModuleListInterface::class, $this->tree, Auth::user())
            ->first(static function (ModuleInterface $module): bool {
                return $module instanceof PlaceHierarchyListModule;
            });
        
        if ($module instanceof PlaceHierarchyListModule) {
            return $module->listUrl($this->tree, [
                'parent' => $this->parts->reverse()->all(),
                'ged'    => $this->tree->name(),
            ]);
        }

        // The place-list module is disabled...
        return '#';
    }
1093210
public function getFormKeyEsiUrl() {
        $urlOptions = array(
            $this->getEsiTtlParam()         => $this->getDefaultEsiTtl(),
            $this->getEsiMethodParam()      => 'esi',
            $this->getEsiScopeParam()       => 'global',
            $this->getEsiCacheTypeParam()   => 'private',
        );
        $esiUrl = Mage::getUrl('turpentine/esi/getFormKey', $urlOptions);
        // setting [web/unsecure/base_url] can be https://... but ESI can never be HTTPS
        $esiUrl = preg_replace('|^https://|i', 'http://', $esiUrl);
        return $esiUrl;
    }
960377
public static function getCurrentUrl()
    {
        if (isset($_SERVER['HTTPS']) &&
            ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) ||
            isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
            $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
            $protocol = 'https';
        }
        else {
            $protocol = 'http';
        }

        return "$protocol://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
    }
116980
protected function getCurrentUrl() {
        $isHttps = $this->getServerVar('HTTPS');
        $forwardedProto = $this->getServerVar('HTTP_X_FORWARDED_PROTO');
        if ($isHttps == 'on' || $forwardedProto === 'https') {
            $schema = 'https://';
        } else {
            $schema = 'http://';
        }

        $host = $this->getServerVar('HTTP_HOST');

        if (preg_match('#:(\d+)$#', $host, $match)) {
            $port = ':' . $match[1];
        } else {
            $port = '';
        }
        $urls = parse_url($this->getServerVar('REQUEST_URI'));

        $path = $urls['path'];
        $query = '';

        return $schema . $host . $port . $path . $query;
    }
518969
public function getSignedDownloadUrl($path, $expires = 3600, $host_name = '', $use_ssl = false)
    {
        $object = $this->applyPathPrefix($path);
        $url = $this->client->signUrl($this->bucket, $object, $expires);

        if (! empty($host_name) || $use_ssl) {
            $parse_url = parse_url($url);
            if (! empty($host_name)) {
                $parse_url['host'] = $this->bucket.'.'.$host_name;
            }
            if ($use_ssl) {
                $parse_url['scheme'] = 'https';
            }

            $url = (isset($parse_url['scheme']) ? $parse_url['scheme'].'://' : '')
                   .(
                   isset($parse_url['user']) ?
                       $parse_url['user'].(isset($parse_url['pass']) ? ':'.$parse_url['pass'] : '').'@'
                       : ''
                   )
                   .(isset($parse_url['host']) ? $parse_url['host'] : '')
                   .(isset($parse_url['port']) ? ':'.$parse_url['port'] : '')
                   .(isset($parse_url['path']) ? $parse_url['path'] : '')
                   .(isset($parse_url['query']) ? '?'.$parse_url['query'] : '');
        }

        return $url;
    }
592051
public function getServerSamlValidateURL()
    {
        phpCAS::traceBegin();
        // the URL is build only when needed
        if ( empty($this->_server['saml_validate_url']) ) {
            switch ($this->getServerVersion()) {
            case SAML_VERSION_1_1:
                $this->_server['saml_validate_url'] = $this->_getServerBaseURL().'samlValidate';
                break;
            }
        }

        $url = $this->_buildQueryUrl(
            $this->_server['saml_validate_url'],
            'TARGET='.urlencode($this->getURL())
        );
        phpCAS::traceEnd($url);
        return $url;
    }
474005
public function getAbsoluteUrl()
    {
        $https = Kwf_Util_Https::domainSupportsHttps($this->getDomain());
        $protocol = $https ? 'https' : 'http';
        return $protocol . '://'.$this->getDomain().$this->url;
    }
257881
public function getRedirectUrlFromSession()
    {
        $pll = $this->app->make(PostLoginLocation::class);
        $url = $pll->getSessionPostLoginUrl(true);

        return $url === '' ? false : $url;
    }
916859
public function buildUrl()
    {

        if (isset($this->otherOptions['urlProcessRegEx'])
            && !empty($this->otherOptions['urlProcessRegEx'])
        ) {
            unset($this->otherOptions['urlProcessPattern']);
        }

        if (isset($this->otherOptions['urlCrawlRegEx'])
            && !empty($this->otherOptions['urlCrawlRegEx'])
        ) {
            unset($this->otherOptions['urlCrawlPattern']);
        }


        // Add token
        $url = 'token=' . $this->diffbot->getToken();

        if ($this->getName()) {
            // Add name
            $url .= '&name=' . $this->getName();

            // Add seeds
            if (!empty($this->seeds)) {
                $url .= '&seeds=' . implode('%20', array_map(function ($item) {
                        return urlencode($item);
                    }, $this->seeds));
            }

            // Add other options
            if (!empty($this->otherOptions)) {
                foreach ($this->otherOptions as $option => $value) {
                    $url .= '&' . $option . '=' . $value;
                }
            }

            // Add API link
            $url .= '&apiUrl=' . $this->getApiString();
        }

        return $url;
    }
893414
public static function get_current_url()
    {
        $url = '';

        // Check to see if it's over https
        $is_https = self::is_https();
        if ($is_https) {
            $url .= 'https://';
        } else {
            $url .= 'http://';
        }

        // Was a username or password passed?
        if (isset($_SERVER['PHP_AUTH_USER'])) {
            $url .= $_SERVER['PHP_AUTH_USER'];

            if (isset($_SERVER['PHP_AUTH_PW'])) {
                $url .= ':' . $_SERVER['PHP_AUTH_PW'];
            }

            $url .= '@';
        }


        // We want the user to stay on the same host they are currently on,
        // but beware of security issues
        // see http://shiflett.org/blog/2006/mar/server-name-versus-http-host
        $url .= $_SERVER['HTTP_HOST'];

        $port = $_SERVER['SERVER_PORT'];

        // Is it on a non standard port?
        if ($is_https && ($port != 443)) {
            $url .= ':' . $_SERVER['SERVER_PORT'];
        } elseif (!$is_https && ($port != 80)) {
            $url .= ':' . $_SERVER['SERVER_PORT'];
        }

        // Get the rest of the URL
        if (!isset($_SERVER['REQUEST_URI'])) {
            // Microsoft IIS doesn't set REQUEST_URI by default
            $url .= $_SERVER['PHP_SELF'];

            if (isset($_SERVER['QUERY_STRING'])) {
                $url .= '?' . $_SERVER['QUERY_STRING'];
            }
        } else {
            $url .= $_SERVER['REQUEST_URI'];
        }

        return $url;
    }
857537
public function getQueryUrl()
    {

        $uri = $this->getBaseUrl();
        $uri .= Zend_Gdata_Gapps::APPS_NICKNAME_PATH;
        if ($this->_nickname !== null) {
            $uri .= '/' . $this->_nickname;
        }
        $uri .= $this->getQueryString();
        return $uri;
    }
1283908
public function getSiteUrl(): string
    {
        $url = $this->getStringValue(PlatformConfigurationInterface::KEY_SITE_URL);

        if (empty($url)) {
            $scheme = \filter_input(INPUT_SERVER, 'REQUEST_SCHEME');
            $server = \filter_input(INPUT_SERVER, 'SERVER_NAME');
            $url = $scheme.'://'.$server;
        }

        return $url;
    }