Gets WRAP access token with specified target Uri.

@param string $targetUri The target Uri of the WRAP access Token

@return string
979545
public function getAccessToken($targetUri)
    {
        Validate::isString($targetUri, '$targetUri');

        $this->_sweepExpiredTokens();
        $scopeUri = $this->_createScopeUri($targetUri);

        if (array_key_exists($scopeUri, $this->_activeTokens)) {
            $activeToken = $this->_activeTokens[$scopeUri];

            return $activeToken->getWrapAccessTokenResult()->getAccessToken();
        }

        $wrapAccessTokenResult = $this->_wrapRestProxy->wrapAccessToken(
            $this->_wrapUri,
            $this->_wrapName,
            $this->_wrapPassword,
            $scopeUri
        );

        $expirationDateTime = new \DateTime('now');
        $expiresIn = intval($wrapAccessTokenResult->getExpiresIn() / 2);
        $expirationDateTime = $expirationDateTime->add(
            new \DateInterval('PT'.$expiresIn.'S')
        );

        $acquiredActiveToken = new ActiveToken($wrapAccessTokenResult);
        $acquiredActiveToken->setExpirationDateTime($expirationDateTime);
        $this->_activeTokens[$scopeUri] = $acquiredActiveToken;

        return $wrapAccessTokenResult->getAccessToken();
    }
1217686
public static function getAbsoluteUri(string $uri = null) : string
    {
        $uri = new self($uri);

        return $uri->get(false);
    }
1366027
public function getBaseAuthorizationUrl()
    {
        $base = new Uri($this->authUrl);
        $path = new Uri('/authorization');
        return (string) UriResolver::resolve($base, $path);
        ;
    }
1310627
public function getResourceOwnerDetailsUrl(AccessToken $token)
    {
        $authorizedUser = $this->getAuthorizedUser($token);

        $params = [
            'token' => $token->getToken(),
            'user'  => $authorizedUser->getId()
        ];

        return 'https://slack.com/api/users.info?'.http_build_query($params);
    }
1183271
protected function getUriInterface($uri)
    {
        if ($uri instanceof UriInterface) {
            return UriInterface::class;
        }

        if ($uri instanceof Uri) {
            return Uri::class;
        }

        throw Exception::fromInvalidUri($uri);
    }
668472
public function getUri()
    {
        if (!isset($this->uri)) {
            $this->uri = $this->determineUri();
        }
        
        return $this->uri;
    }
734036
public static function getUri() {
        if (self::$_uri === null) {
            $uri = explode('?', $_SERVER['REQUEST_URI'], 2)[0];
            self::$_uri = self::fixUri(substr($uri, strlen(BASE_URI)));
        }
        return self::$_uri;
    }
942535
public function getAccessToken(string $session_token):AccessToken{

		$params = [
			'method'  => 'auth.getSession',
			'format'  => 'json',
			'api_key' => $this->options->key,
			'token'   => $session_token,
		];

		$params['api_sig'] = $this->getSignature($params);

		$request = $this->requestFactory
			->createRequest('GET', Psr7\merge_query($this->apiURL, $params));


		return $this->parseTokenResponse($this->http->sendRequest($request));
	}
1219333
public function getAccessToken($access_token)
    {
        return isset($this->accessTokens[$access_token]) ? $this->accessTokens[$access_token] : null;
    }
1124719
private function parseUri($uri)
    {
        $parts = parse_url($uri);

        if (false === $parts) {
            throw new \InvalidArgumentException(
                'The source URI string appears to be malformed'
            );
        }

        $this->scheme    = isset($parts['scheme'])   ? $this->filterScheme($parts['scheme']) : '';
        $this->userInfo  = isset($parts['user'])     ? $parts['user']     : '';
        $this->host      = isset($parts['host'])     ? $parts['host']     : '';
        $this->port      = isset($parts['port'])     ? $parts['port']     : null;
        $this->path      = isset($parts['path'])     ? $this->filterPath($parts['path']) : '';
        $this->query     = isset($parts['query'])    ? $this->filterQuery($parts['query']) : '';
        $this->fragment  = isset($parts['fragment']) ? $this->filterFragment($parts['fragment']) : '';

        if (isset($parts['pass'])) {
            $this->userInfo .= ':' . $parts['pass'];
        }
    }
12798
public function analyseLink($linkUri)
    {
        // Joining slash between uriElements and actual linkUri must be present, except if $linkUri is empty or is just the slash root.
        $joiningSlash = empty($linkUri) || ($linkUri === '/') ? '' : '/';
        $linkUri = ltrim($linkUri, '/');
        // Removing query string to analyse as SiteAccess might be in it.
        $qsPos = strpos($linkUri, '?');
        $queryString = '';
        if ($qsPos !== false) {
            $queryString = substr($linkUri, $qsPos);
            $linkUri = substr($linkUri, 0, $qsPos);
        }

        return "/{$this->key}{$joiningSlash}{$linkUri}{$queryString}";
    }
1262370
public static function get($uri, $options=[])
    {
      if ($token = self::$_config->get('ACCESS_TOKEN')) {
        $uri = $uri . "?access_token=" . $token;
      }
      return self::$_restClient->get($uri, $options);
    }
622742
public function getAuthUri($state, $redirectUri, array $scopes = array())
    {
        $params = array(
            'response_type' => 'code',
            'client_id' => $this->credentialsId,
            'scope' => implode(' ', $scopes),
            'redirect_uri' => $redirectUri,
            'state' => $state,
        );
        return $this->authEndpoint . (strpos($this->authEndpoint, '?') === false ? '?' : '&')
            . http_build_query($params, null, '&');
    }
1241209
public function getUri()
    {
        $uri = rtrim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH),'/');
        $baseUri = $this->getBaseUri();
        $uri = str_replace($baseUri, '', $uri)?: '/';

        return $uri;
    }
1201672
public static function getRelativePath(UriInterface $baseUri, UriInterface $uri): string
    {
        // FIXME: We should probably do a strpos === 0 instead to make sure the baseUri actually matches the start of the Uri.
        $baseUriLength = strlen($baseUri->getPath());
        if ($baseUriLength >= strlen($uri->getPath())) {
            return '';
        }

        return substr($uri->getPath(), $baseUriLength);
    }
352645
protected function getActualUri( $uri )
	{
		// Break the Uri into its parts
		$path = parse_url( $uri, PHP_URL_PATH );
		// Skip the scheme/domain/us-gaap/year/
		$parts = explode( '/', $path );
		array_splice( $parts, 0, 3, $this->getFirstFolderName() );
		return join( '/', $parts );

		return $this->actualSchemaFilename;
	}
712098
private function _createScopeUri($targetUri)
    {
        $targetUriComponents = parse_url($targetUri);

        $authority = Resources::EMPTY_STRING;
        if ($this->_containsValidAuthority($targetUriComponents)) {
            $authority = $this->_createAuthority($targetUriComponents);
        }

        $scopeUri = 'http://'
            .$authority
            .$targetUriComponents[Resources::PHP_URL_HOST];

        if (array_key_exists(Resources::PHP_URL_PATH, $targetUriComponents)) {
            $scopeUri .= $targetUriComponents[Resources::PHP_URL_PATH];
        }

        return $scopeUri;
    }