Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev master #129

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"keywords": ["yii2", "extension", "eauth", "openid", "oauth", "authentication"],
"homepage": "https://github.com/Nodge/yii2-eauth",
"type": "yii2-extension",
"license": "New BSD License",
"license": "MIT",
"authors": [
{
"name": "Maxim Zemskov",
Expand All @@ -21,13 +21,13 @@
}
},
"require": {
"php": ">=5.4.0",
"php": ">=7.2",
"lib-curl": "*",
"yiisoft/yii2": "*",
"yiisoft/yii2": "~2.0.0",
"lusitanian/oauth": "~0.3.0",
"nodge/lightopenid": "~1.1.0"
},
"extra": {
"bootstrap": "nodge\\eauth\\Bootstrap"
}
}
}
4 changes: 2 additions & 2 deletions src/EAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace nodge\eauth;

use Yii;
use yii\base\Object;
use yii\base\BaseObject;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;

Expand All @@ -19,7 +19,7 @@
*
* @package application.extensions.eauth
*/
class EAuth extends Object
class EAuth extends BaseObject
{

/**
Expand Down
4 changes: 2 additions & 2 deletions src/ServiceBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace nodge\eauth;

use Yii;
use yii\base\Object;
use yii\base\BaseObject;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use OAuth\Common\Http\Uri\Uri;
Expand All @@ -21,7 +21,7 @@
*
* @package application.extensions.eauth
*/
abstract class ServiceBase extends Object implements IAuthService
abstract class ServiceBase extends BaseObject implements IAuthService
{

/**
Expand Down
2 changes: 1 addition & 1 deletion src/oauth2/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ protected function getCallbackUrl()
array_unshift($route, '');

// Can not use these params in OAuth2 callbacks
foreach (['code', 'state', 'redirect_uri'] as $param) {
foreach (['code', 'state', 'redirect_uri', 'scope'] as $param) {
if (isset($route[$param])) {
unset($route[$param]);
}
Expand Down
4 changes: 1 addition & 3 deletions src/services/FacebookOAuth2Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,13 @@ protected function fetchAttributes()
'query' => [
'fields' => join(',', [
'id',
'name',
'link'
'name'
])
]
]);

$this->attributes['id'] = $info['id'];
$this->attributes['name'] = $info['name'];
$this->attributes['url'] = $info['link'];

return true;
}
Expand Down