You are here

private static function RequestException::obfuscateUri in Auth0 Single Sign On 8.2

Obfuscates URI if there is a username and a password present

Parameters

UriInterface $uri:

Return value

UriInterface

1 call to RequestException::obfuscateUri()
RequestException::create in vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
Factory method to create a new exception with a normalized error message

File

vendor/guzzlehttp/guzzle/src/Exception/RequestException.php, line 137

Class

RequestException
HTTP Request exception

Namespace

GuzzleHttp\Exception

Code

private static function obfuscateUri(UriInterface $uri) {
  $userInfo = $uri
    ->getUserInfo();
  if (false !== ($pos = strpos($userInfo, ':'))) {
    return $uri
      ->withUserInfo(substr($userInfo, 0, $pos), '***');
  }
  return $uri;
}