i am currently working on a yii2 based Rest api. i use bearer token for user authentication.let me explain the requirement.
1)first user authenticated from a external php application using their credentials.
2)he/she got an access Token.
3)each subsequent request is made using this access token.
public static function findIdentityByAccessToken($token, $type = null)
{
return static::findOne(['auth_key' => $token]);
}
this is where i start thinking. i do not found any expiration time for the access token. is that really needed? if yes how can i archive that? Thanks in advance.