Get the login url
191649
function getLoginUrl($state) {
        $loginUrl = "https://accounts.google.com/o/oauth2/auth?"
            . "client_id=" . $this->client_id
            . "&redirect_uri=" . $this->redirect
            . "&state=" . $state
            . "&response_type=code"
            . "&scope=email%20profile" 
            . "&include_granted_scopes=true";

        if ( $this->openid_realm ) {
            $loginUrl .= "&openid.realm=" . $this->openid_realm;
        }
        return $loginUrl;
    }
257881
public function getRedirectUrlFromSession()
    {
        $pll = $this->app->make(PostLoginLocation::class);
        $url = $pll->getSessionPostLoginUrl(true);

        return $url === '' ? false : $url;
    }
815913
public function getAuthLoginUrl()
    {
        $callback    = $this->getAuthCallbackUrl();
        $clientIdKey = $this->getClientIdKey();
        $clientSKey  = $this->getClientSecretKey();
        $state       = $this->getAuthLoginState();
        $url         = $this->getAuthenticationUrl()
            .'pages/'.$this->keys[$clientIdKey].'.json'
            .'?api_key='.$this->keys[$clientSKey]
            .'&response_type=code'
            .'&redirect_uri='.urlencode($callback)
            .'&state='.$state;

        if ($this->session) {
            $this->session->set($this->getName().'_csrf_token', $state);
        }

        return $url;
    }
466144
def get_url(self, url):
        
        _r = self.br.open(url)

        # check that we've not been redirected to the login page
        if self.br.geturl().startswith(self.AUTH_URL):
            raise AuthRequiredException
        elif self.br.geturl().startswith(self.ERROR_URL):
            raise RequestErrorException
        else:
            return _r.read()
1335211
function getCookieAuthUrl(nextUri) {
    nextUri = nextUri || config.OSF.redirectUri;
    const loginUri = `${config.OSF.url}login/?next=${encodeURIComponent(nextUri)}`;
    return `${config.OSF.cookieLoginUrl}?service=${encodeURIComponent(loginUri)}`;
}
1109285
def login(self, request, extra_context=None):
        
        context = {
            'title': _('Log in'),
            'app_path': request.get_full_path(),
        }
        if (REDIRECT_FIELD_NAME not in request.GET and
                REDIRECT_FIELD_NAME not in request.POST):
            context[REDIRECT_FIELD_NAME] = request.get_full_path()
        context.update(extra_context or {})
        defaults = {
            'extra_context': context,
            'current_app': self.name,
            'authentication_form': self.login_form or AdminAuthenticationForm,
            'template_name': self.login_template or 'admin/login.html',
        }
        return login(request, **defaults)
696431
public String getURL()
  {
    int port = getPort();

    return (getScheme() + "://" + getHost() + 
            (port == 80 ? "" : ":" + getPort()) +
            getPath() +
            (_query == null ? "" : "?" + _query));
  }
485570
private URL getUrl() {
		ClassLoader loader = Thread.currentThread().getContextClassLoader();
		URL url = loader.getResource(this.getPath());
		return url;
	}
745401
def authentication_url(self):
        """"""
        params = {
            'client_id': self.client_id,
            'response_type': self.type,
            'redirect_uri': self.callback_url
        }
        return AUTHENTICATION_URL + "?" + urlencode(params)
193153
public function getURL()
    {
        $p = $this->recall('page');

        // If there is a login page, no need to return to it
        if ($p == 'login') {
            return $this->app->url('/');
        }

        $url = $this->app->url($p, $this->recall('args', null));
        $this->forget('page');
        $this->forget('args');

        return $url;
    }
503528
def get_base_url(html: str) -> str:
    
    forms = BeautifulSoup(html, 'html.parser').find_all('form')
    if not forms:
        raise VVKBaseUrlException('Form for login not found')
    elif len(forms) > 1:
        raise VVKBaseUrlException('More than one login form found')
    login_url = forms[0].get('action')
    if not login_url:
        raise VVKBaseUrlException('No action tag in form')
    return login_url
1162543
public function getLoginUrl($redirect_uri, $scopes = array("read_public"), $response_type = "code")
    {
        $queryparams = array(
            "response_type"     => $response_type,
            "redirect_uri"      => $redirect_uri,
            "client_id"         => $this->client_id,
            "client_secret"     => $this->client_secret,
            "scope"             => implode(",", $scopes),
            "state"             => $this->state
        );

        // Build url and return it
        return sprintf("%s?%s", self::AUTH_HOST, http_build_query($queryparams));
    }
1261535
private String getLoginFormURL(HttpServletRequest req, HttpServletResponse res) throws IOException {

        CmsHttpAuthenticationSettings httpAuthenticationSettings = OpenCms.getSystemInfo().getHttpAuthenticationSettings();
        String loginFormURL = null;

        // this will create an admin user with the "right" site root already set
        CmsObject adminCms;
        try {
            adminCms = initCmsObject(req, res, OpenCms.getDefaultUsers().getUserAdmin(), null, null);
        } catch (CmsException e) {
            // this should never happen, if it does we can't continue
            throw new IOException(
                Messages.get().getBundle().key(
                    Messages.ERR_INVALID_INIT_USER_2,
                    OpenCms.getDefaultUsers().getUserAdmin(),

                    null),
                e);
        }
        // get the requested resource
        String path = adminCms.getRequestContext().getUri();
        CmsProperty propertyLoginForm = null;
        try {
            propertyLoginForm = adminCms.readPropertyObject(path, CmsPropertyDefinition.PROPERTY_LOGIN_FORM, true);
        } catch (Throwable t) {
            if (t instanceof CmsVfsResourceNotFoundException) {
                // if we can't read the property from the path, try to use the resource init handlers to find the
                // resource to read it from
                CmsResource alternativeResource = null;
                try {
                    // use null as the response to avoid side effects like redirects, etc.
                    alternativeResource = initResource(adminCms, path, req, null);
                    if (alternativeResource != null) {
                        propertyLoginForm = adminCms.readPropertyObject(
                            adminCms.getSitePath(alternativeResource),
                            CmsPropertyDefinition.PROPERTY_LOGIN_FORM,
                            true);
                    }
                } catch (Exception e) {
                    LOG.error(e.getLocalizedMessage(), e);
                }
            }

            if (propertyLoginForm == null) {
                if (LOG.isWarnEnabled()) {
                    LOG.warn(
                        Messages.get().getBundle().key(
                            Messages.LOG_ERROR_READING_AUTH_PROP_2,
                            CmsPropertyDefinition.PROPERTY_LOGIN_FORM,
                            path),
                        t);
                }

            }
        }

        String params = null;
        if ((propertyLoginForm != null)
            && (propertyLoginForm != CmsProperty.getNullProperty())
            && CmsStringUtil.isNotEmpty(propertyLoginForm.getValue())) {
            // login form property value was found
            // build a redirect URL using the value of the property
            // "__loginform" is a dummy request parameter that could be used in a JSP template to trigger
            // if the template should display a login formular or not
            loginFormURL = propertyLoginForm.getValue();
            params = "__loginform=true";
        } else if (!httpAuthenticationSettings.useBrowserBasedHttpAuthentication()
            && CmsStringUtil.isNotEmpty(httpAuthenticationSettings.getFormBasedHttpAuthenticationUri())) {
            // login form property value not set, but form login set in configuration
            // build a redirect URL to the default login form URI configured in opencms.properties
            loginFormURL = httpAuthenticationSettings.getFormBasedHttpAuthenticationUri();
        }

        String callbackURL = CmsRequestUtil.encodeParamsWithUri(path, req);
        if (loginFormURL != null) {
            if (!loginFormURL.startsWith("http")) {
                loginFormURL = m_linkManager.substituteLink(adminCms, loginFormURL, null, true);
            } else {
                callbackURL = m_linkManager.getServerLink(adminCms, path);
                callbackURL = CmsRequestUtil.encodeParamsWithUri(callbackURL, req);
            }
        }

        return m_authorizationHandler.getLoginFormURL(loginFormURL, params, callbackURL);
    }
1337028
def get_user(self, login):
        
        return youtrack.User(self._get("/admin/user/" + urlquote(login.encode('utf8'))), self)
437499
def login_url(service_url=request.url)
      url = URI(Rails.application.cas_server_url)
      url.path = "/login"
      url.query = "service=#{service_url || request.url}"
      url.to_s
    end
380887
def get_url(self, **kwargs):
        

        return build(
            self._request.path,
            self._request.GET,
            self._meta.prefix,
            **kwargs )
231818
def _make_login(self):
        
        login_url = '{}data/v1/session/login?user={}&pass={}&sid={}'.format(self.base_url, self.username, self.password,
                                                                            self._parse_session_id(self._session_info))
        self._session_info = get_json(login_url)