pgaultier / yii2-oauth2

OAuth2 wrapper for Yii2 applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can't access token by query parameter(yii\filters\auth\QueryParamAuth)

dixonsatit opened this issue · comments

Hi, i can't access query parameter. you can remove this line for support query parameter.

https://github.com/pgaultier/yii2-oauth2/blob/devel/src/traits/IdentityTrait.php#L68
eg.
http://app-sso.dev/api/v1/user/info?access-token=fbc0a36d1aa50c5ef32c0a7a86700e3cf7b2c1ba

this config

'authenticator' => [
                'class' => CompositeAuth::className(),
                'authMethods' => [
                    ['class' => HttpBearerAuth::className()],
                    ['class' => QueryParamAuth::className()],
                ]
            ],

Thank you.

Trait has been updated into devel to allow HttpBearerAuth or QueryParamAuth
You can see it here : https://github.com/pgaultier/yii2-oauth2/blob/devel/src/traits/IdentityTrait.php#L68

please tell me if fix works as expected for you.