I'm using Codeigniter 3, HMVC and Codeigniter rest-server 2.7.2. When I set the authentication to 'session' the rest-server returns 401 Unauthorized even though my session is set and the proper data exists. The same happens if I set 'sess_driver' to 'files'. Everything works if I turn authentication off by setting 'rest_auth' to FALSE.
Can anybody suggest a solution?
I have the following settings:
config/config.php
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'session_';
$config['sess_save_path'] = 'ci_sessions'; // Which is also correct table name
config/rest.php
$config['rest_auth'] = 'session';
// I've understood that this should be identical to sess_cookie_name.
$config['auth_source'] = 'session_';