loginByAccessToken() public method
Logs in a user by the given access token.
This method will first authenticate the user by calling yii\web\IdentityInterface::findIdentityByAccessToken() with the provided access token. If successful, it will call login() to log in the authenticated user. If authentication fails or login() is unsuccessful, it will return null.
public yii\web\IdentityInterface|null loginByAccessToken ( $token, $type = null ) | ||
---|---|---|
$token | string |
The access token |
$type | mixed |
The type of the token. The value of this parameter depends on the implementation. For example, yii\filters\auth\HttpBearerAuth will set this parameter to be |
return | yii\web\IdentityInterface|null |
The identity associated with the given access token. Null is returned if the access token is invalid or login() is unsuccessful. |
Please login to continue.