Extend the LUYA Admin by providing app's which then LUYA Admin users can authenticated through the API.
Install the extension through composer:
composer require luyadev/luya-module-admin-usertokenadd to the config
'modules' => [
//...
'usertoken' => [
'class' => 'luya\admin\usertoken\Module',
]
]bootstrap the app:
'bootstrap' => [
'luya\admin\usertoken\Bootstrap',
]Run the import command afterwards:
./luya migrate./luya import- Create an App in the Admin UI. The App identifier is used for login.
- Use the APIs to make a Login Request for a given User (POST request to
/admin/api-usertoken-loginwith fieldsemail,passwordandapp).
When a user is authenaticated and an access token is generated, all API requests with this token will be threated as this user. Also in terms of "language". You are not able to force a certain language with f.e. _lang since the user Admin UI Settings will be loaded. In order to change that behavior and force a certain fixed language see Module::$forceUserLanguage property.

