Skip to content
Snippets Groups Projects
Commit e47d6d27 authored by Jaime Perez's avatar Jaime Perez Committed by Jaime Perez Crespo
Browse files

Get attributes from session in a proper way.

parent b121777a
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ try {
exit(); // and be done.
}
$attributes = $session->getAttributes();
$attributes = $session->getAuthData($as, 'Attributes');
// Assume user consent at this point and proceed with authorizing the token
list($url, $verifier) = $store->authorize($requestToken, $attributes);
......
......@@ -13,7 +13,7 @@ $useridattr = $oauthconfig->getValue('useridattr', 'user');
//$useridattr = $oauthconfig->getValue('useridattr', 'uid');
if ($session->isValid($authsource)) {
$attributes = $session->getAttributes();
$attributes = $session->getAuthData($authsource, 'Attributes');
// Check if userid exists
if (!isset($attributes[$useridattr]))
throw new Exception('User ID is missing');
......
......@@ -13,7 +13,7 @@ $useridattr = $oauthconfig->getValue('useridattr', 'user');
//$useridattr = $oauthconfig->getValue('useridattr', 'uid');
if ($session->isValid($authsource)) {
$attributes = $session->getAttributes();
$attributes = $session->getAuthData($authsource, 'Attributes');
// Check if userid exists
if (!isset($attributes[$useridattr]))
throw new Exception('User ID is missing');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment