Digest auth always valid
The same as with basic auth...but basic auth was solved with two lines of code 👍 Is there a workaround this? Could you at lease point out where we should look into?
thanks
There's a bug in REST_Controller, fixed with this PR: https://github.com/chriskacerguis/codeigniter-restserver/pull/759
Until this is merged I created a workaround using a wrapper function for "response" that checks for authorization. I placed it in my base_controller (inherits REST_Controller).
public function do_response( $data = null, $http_code = null ) {
if ( $this->_allow && $this->has_permission ) {
parent::response( $data, $http_code );
}
}
Hi benyamin, thanks for your help but I tried your PR and it didn't work...it gives me the following error (and more) A PHP Error was encountered Severity: Notice Message: Undefined index: username Filename: libraries/REST_Controller.php Line Number: 2040
Same error: A PHP Error was encountered Severity: Notice Message: Undefined index: username Filename: libraries/REST_Controller.php Line Number: 2049
A PHP Error was encountered Severity: Notice Message: Undefined index: qop Filename: libraries/REST_Controller.php Line Number: 2056
A PHP Error was encountered Severity: Notice Message: Undefined index: response Filename: libraries/REST_Controller.php Line Number: 2059
[{"id":1,"name":"John","email":"[email protected]","fact":"Loves coding"},{"id":2,"name":"Jim","email":"[email protected]","fact":"Developed on CodeIgniter"},{"id":3,"name":"Jane","email":"[email protected]","fact":"Lives in the USA","0":{"hobbies":["guitar","cycling"]}}]
See here https://github.com/chriskacerguis/codeigniter-restserver/issues/790
Closing this, please reopen if you are still having the issues.