Hello i am having a problemm to understand how to enable basic authentication using CodeIgniter and using the https://github.com/chriskacerguis/codeigniter-restserver. The rest.php:
|--------------------------------------------------------------------------
| REST Login
|--------------------------------------------------------------------------
|
| Set to specify the REST API requires to be logged in
|
| FALSE No login required
| 'basic' Unsecure login
| 'digest' More secure login
| 'session' Check for a PHP session variable. See 'auth_source' to set the
| authorization key
|
*/
$config['rest_auth'] = 'basic';
i enable the basic auth and below i have this:
/*
|--------------------------------------------------------------------------
| REST Login Usernames
|--------------------------------------------------------------------------
|
| Array of usernames and passwords for login, if ldap is configured this is ignored
|
*/
$config['rest_valid_logins'] = ['admin' => '1234'];
if i use admin as username and 1234 as password the login is fine. My question is how can i register users to my database and also update the valid logins config? When the user registers i dont have to go to rest.php and add the record to $config['rest_valid_logins'] but it will be done automatically?
Any help will be appreciated!!!