Skip to content
Snippets Groups Projects
Commit 8285469c authored by Julian's avatar Julian
Browse files

Adapted after-login USERINFO to be similar to other requests

parent 544b2d83
No related branches found
No related tags found
No related merge requests found
Pipeline #949 passed
......@@ -195,7 +195,10 @@ class auth_plugin_oauth extends auth_plugin_authldap {
*/
protected function processLogin($sticky, $service, $servicename, $page, $params = array()) {
$uinfo = $service->getUser();
$this->setUserSession($uinfo, $servicename);
$ok = $this->setUserSession($uinfo, $servicename);
if (!$ok) {
return false;
}
$this->setUserCookie($uinfo['user'], $sticky, $servicename);
if(isset($page)) {
if(!empty($params['id'])) unset($params['id']);
......@@ -212,13 +215,17 @@ class auth_plugin_oauth extends auth_plugin_authldap {
global $USERINFO;
global $conf;
$USERINFO = $data;
$USERINFO = $this->getUserData($data['user']);
if (!$USERINFO) {
return false;
}
$_SERVER['REMOTE_USER'] = $data['user'];
$_SESSION[DOKU_COOKIE]['auth']['user'] = $data['user'];
//$_SESSION[DOKU_COOKIE]['auth']['pass'] = '';
$_SESSION[DOKU_COOKIE]['auth']['buid'] = auth_browseruid();
$_SESSION[DOKU_COOKIE]['auth']['time'] = time();
$_SESSION[DOKU_COOKIE]['auth']['oauth'] = $service;
return true;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment