Authentication without AR using remote service

Hello,

I’m creating an application, which is a “thin” client of large RESTfull application.

My problem is that I don’t have any local storage (database) - everything is is stored/happens inside main application - behind the RESTfull API.

I can’t create user model (like in skeleton application), because I can’t implement “findIdentity” and “findIdentityByAccessToken” methods.

API provides "/login" endpoint, which requires username/password parameters & returns access token.

I have no problems with Yii1, where I have "authenticate" method, but now I have an opportunity to rewrite everything, and I would like to use Yii2…

…any ideas?