function Utils::redactUserInfo
Redact the password in the user info part of a URI.
1 call to Utils::redactUserInfo()
- 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/ psr7/ src/ Utils.php, line 256
Class
Namespace
GuzzleHttp\Psr7Code
public static function redactUserInfo(UriInterface $uri) : UriInterface {
$userInfo = $uri->getUserInfo();
if (false !== ($pos = \strpos($userInfo, ':'))) {
return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');
}
return $uri;
}