Get URL for authorization.

@param bool [$force_login]
@return string URL
432892
public function getAuthorizeUrl($force_login = false) {
        $params = http_build_query(array(
            'oauth_token' => $this->ot,
            'force_login' => $force_login ? 1 : null,
        ), '', '&');
        return 'https://api.twitter.com/oauth/authorize?' . $params;
    }
647156
public function getToken($forceRefresh = false)
    {
        $cacheKey = $this->cacheKey;

        $cached = $this->cache->get($cacheKey);

        if ($forceRefresh || !$cached) {
            $token = $this->getTokenFromServer();

            $this->cache->set($cacheKey, $token['access_token'], $token['expires_in'] - 800);

            return $token['access_token'];
        }

        return $cached;
    }
354751
public function loginUrl()
    {
        $query = 'client_id=' . $this->app->getId() . '&redirect_uri=' . urlencode($this->callback) . '&response_type=code&state=' . $this->state;
        $query .= isset($this->scopes) ? '&scope=' . urlencode(str_replace(',', ' ', implode(',', $this->scopes))) : '';

        return sprintf('%s%s?%s', Constants::API_HOST, Constants::API_AUTH, $query);
    }
939358
public function getAuthUrl()
    {
        if (! $oauthConfig = $this->client->getConfig("oauth2")) {
            throw new \Exception('OAuth2 authorisation not registered');
        }

        $command = $this->client->getCommand('GetAuthUrl', (array) $oauthConfig)->prepare();
        return $command->getUrl();
    }
684650
public function getLoginLink($partner_id_customer, $redirect_url="")
    {
        $params = [
            "partner_id_customer" => $partner_id_customer,
            "redirect_url" => $redirect_url
        ];

        return $this->performRequest(
            self::METHOD_POST,
            sprintf('/api/reseller/v%d/get-login-link', self::API_VERSION),
            $params
        );
    }
611569
public function getAuthorizationUrl(array $options = [])
    {
        $base   = $this->getBaseAuthorizationUrl();
        $params = $this->getAuthorizationParameters($options);
        $query  = $this->getAuthorizationQuery($params);

        return $this->appendQuery($base, $query);
    }
585452
public static function force_loggedin() {
	if (self::is_loggedin() == false) {
		$request = bootstrap::get_library('request');
		$request::redirect(self::$login_url);
	}
	
	return true;
}
961970
public function getAuthorizationUrl() 
    {
        $result = null;
        if (!$this->config->hasCredentials()) {
            $this->registerApplication();
        }
        //Return the Authorization URL
        return "https://{$this->config->getMastodonInstance()}/oauth/authorize/?".http_build_query(
            [
            "response_type"    => "code",
            // @todo review usage of singular / plural in redirect_uri
            "redirect_uri"     => $this->config->getRedirectUris(),
            "scope"            => $this->config->getScopes(),
            "client_id"        => $this->config->getClientId(),
            ]
        );
    }
1246111
public function getToken($forceRefresh = false)
    {
        $cached = $this->authorization->getAuthorizerAccessToken();

        if ($forceRefresh || empty($cached)) {
            return $this->refreshToken();
        }

        return $cached;
    }
253915
function get_after_plugin_activation_redirect_url() {
            $url = false;

            if ( ! $this->is_addon() || ! $this->has_free_plan() ) {
                $first_time_path = $this->_menu->get_first_time_path();

                if ( $this->is_activation_mode() ) {
                    $url = $this->get_activation_url();
                } else if ( ! empty( $first_time_path ) ) {
                    $url = $first_time_path;
                } else {
                    $page = '';
                    if ( ! empty( $this->_dynamically_added_top_level_page_hook_name ) ) {
                        if ( $this->is_network_registered() ) {
                            $page = 'account';
                        } else if ( $this->is_network_anonymous() ) {
                            $this->maybe_set_slug_and_network_menu_exists_flag();
                        }
                    }

                    $url = $this->_get_admin_page_url( $page );
                }
            } else {
                $plugin_fs = false;

                if ( $this->is_parent_plugin_installed() ) {
                    $plugin_fs = self::get_parent_instance();
                }

                if ( is_object( $plugin_fs ) ) {
                    if ( ! $plugin_fs->is_registered() ) {
                        // Forward to parent plugin connect when parent not registered.
                        $url = $plugin_fs->get_activation_url();
                    } else {
                        // Forward to account page.
                        $url = $plugin_fs->_get_admin_page_url( 'account' );
                    }
                }
            }

            return $url;
        }
821955
public function getLoginUrl(array $scope = [], $callback_url = '')
    {
        $scope = $this->getScope($scope);
        $callback_url = $this->getCallbackUrl($callback_url);

        return $this->getRedirectLoginHelper()->getLoginUrl($callback_url, $scope);
    }
1207135
public function getLoginUrl($options = array()) {
        $options = array_merge(array(
            'scope' => 'openid profile',
        ), $options);

        if (isset($options['scope']) && is_array($options['scope'])) {
            $options['scope'] = join(' ', $options['scope']);
        }

        // Generate nonce
        if (function_exists('openssl_random_pseudo_bytes')) {
            $nonce = sha1(openssl_random_pseudo_bytes(24));
        } else {
            $nonce = sha1(uniqid(mt_rand(), true));
        }
        $this->sessionStorage->write('nonce', $nonce);

        return $this->getUrl('oauth', 'authorize', array(
            'client_id' => $this->getClientId(),
            'response_type' => 'code',
            'scope' => $options['scope'],
            'redirect_uri' => isset($options['redirect_uri']) ? $options['redirect_uri'] : $this->redirectUri,
            'nonce' => $nonce,
        ));
    }
581768
public function getAuthUrl()
    {
        $return = $this->baseUrl .
          '/' . $this->authNamespace .
          '/' . $this->authVersion .
          '/token?url=' . $this->baseUrl . '/' . $this->apiNamespace;

        return $return;
    }
1288881
public function getLogin()
    {

        if (null !== Auth::user()) {
            return redirect()->intended($this->redirectPath());
        }

        $page_title = "Login";

        return view('backend::auth.login', compact('page_title'));
    }
790164
public function login($callback_url=NULL) {
		if (!$this->f3->exists('GET.oauth_token')) {
			$tokens = $this->requestToken();
			$this->setAuthToken($tokens['oauth_token'], $tokens['oauth_token_secret']);
			if(is_null($callback_url))
				$callback_url = $this->f3->get('SCHEME').'://'.$this->f3->get('HOST').
					$this->f3->get('URI');
			$this->authorize($callback_url);
		} else {
			return $this->accessToken();
		}
	}
1178937
public static function getAuth()
    {
        $result = null;
        if ($user = Arr::key('PHP_AUTH_USER', $_SERVER, true)) {
            $result .= $user;

            if ($password = Arr::key('PHP_AUTH_PW', $_SERVER, true)) {
                $result .= ':' . $password;
            }

            $result .= '@';
        }

        return $result;
    }
32031
public function getOauthClient($forceNew = false)
    {
        if ( ! isset($this->instances[self::CLIENT_OAUTH]) || $forceNew) {
            $this->instances[self::CLIENT_OAUTH] = MeetupOAuthClient::factory($this->getUpdatedOauthConfig());
        }

        return $this->instances[self::CLIENT_OAUTH];
    }