public function Uri::withUserInfo in Auth0 Single Sign On 8.2
Return an instance with the specified user information.
This method MUST retain the state of the current instance, and return an instance that contains the specified user information.
Password is optional, but the user information MUST include the user; an empty string for the user is equivalent to removing user information.
Parameters
string $user The user name to use for authority.:
null|string $password The password associated with $user.:
Return value
static A new instance with the specified user information.
Overrides UriInterface::withUserInfo
File
- vendor/
guzzlehttp/ psr7/ src/ Uri.php, line 438
Class
- Uri
- PSR-7 URI implementation.
Namespace
GuzzleHttp\Psr7Code
public function withUserInfo($user, $password = null) {
$info = $this
->filterUserInfoComponent($user);
if ($password !== null) {
$info .= ':' . $this
->filterUserInfoComponent($password);
}
if ($this->userInfo === $info) {
return $this;
}
$new = clone $this;
$new->userInfo = $info;
$new
->validateState();
return $new;
}