I am trying to integrate REST services on my site. I am using this https://github.com/chriskacerguis/codeigniter-restserver example. So far I was able to successfully call the required data. However, when I wanted to add authorization to it and when I try to access it from Postman I get this error:
{
"status": false,
"error": "Unauthorized"
}
If I remove the auth, it works again. Does anyone know if this is a bug or is there something I'm missing?? This is my configuration:
-------------------------------------------------------------------------
| REST Login
|--------------------------------------------------------------------------
|
| Set to specify the REST API requires to be logged in
|
| FALSE No login required
| 'basic' Unsecured login
| 'digest' More secured login
| 'session' Check for a PHP session variable. See 'auth_source' to set the
| authorization key
|
*/
$config['rest_auth'] = 'basic';
|--------------------------------------------------------------------------
| REST Login Usernames
|--------------------------------------------------------------------------
|
| Array of usernames and passwords for login, if ldap is configured this is ignored
|
*/
$config['rest_valid_logins'] = ['admin' => '1234'];
I can't access it through the url as well. The authentication popup keeps appearing even though I have entered the credentials. Please help