Allow email to be retrieve by SSO ReverseProxy
If REMOTE_EMAIL header is set, use it as user email. If REVERSE_PROXY_DEFAULT_DOMAIN is set but not REMOTE_EMAIL, use the current construct.
This commit is contained in:
@@ -43,10 +43,11 @@ class ReverseProxyAuth extends Base implements PreAuthenticationProviderInterfac
|
||||
public function authenticate()
|
||||
{
|
||||
$username = $this->request->getRemoteUser();
|
||||
$email = $this->request->getRemoteEmail();
|
||||
|
||||
if (! empty($username)) {
|
||||
$userProfile = $this->userCacheDecorator->getByUsername($username);
|
||||
$this->userInfo = new ReverseProxyUserProvider($username, $userProfile ?: array());
|
||||
$this->userInfo = new ReverseProxyUserProvider($username, $email, $userProfile ?: array());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user