yii2-usuario
yii2-usuario copied to clipboard
Enhancement suggestion for using with RESTFul Architecture
Just a suggestion to see if we can enhance the module for usage with RESTFul API architecture.
The authentication needs to follow these Yii2 RESTFul best practices
Some views:
- Based on a module configuration property - RESTFul architecture can be enabled
- For TOKEN based AUTH the user table can be linked to a new
authtable to storeaccess_token/refresh_tokenfor each user - User model can then implement
findIdentityByAccessToken, methods to createaccess_tokenandrefresh_tokenand other suggestions as in Yii2 guide - Leave options to the developer for advanced OAuth based auths
Thanks @kartik-v for bringing the discussion about it, but first would require to split the components (as of https://github.com/2amigos/yii2-usuario/tree/usuario-2.0-dev I am trying to do), then think how this enhancement should be added.
That is something it hit my mind many times. Thanks for bringing the subject.
any updates on this? Any tutorial or documentation to do this? Thanks