CodeIgniter Forums
[Solved] [Library] Authentication issue with the Phil Sturgeon's REST-Server library - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: [Solved] [Library] Authentication issue with the Phil Sturgeon's REST-Server library (/showthread.php?tid=41306)



[Solved] [Library] Authentication issue with the Phil Sturgeon's REST-Server library - El Forum - 05-04-2011

[eluser]EpocDotFr[/eluser]
Hi all !

I'm french so excuse my possible bad spelling.

I've a little auth issue with the Phil Sturgeon's REST-Server library (http://github.com/philsturgeon/codeigniter-restclient), so this topic is for those who use it.

I've enabled the REST authentication in the rest.php configuration file ($config['rest_auth'] = 'digest') and I've set the REST valid logins ($config['rest_valid_logins']).
When I go on the REST server with my web browser, an auth dialog box appear, so I enter my login / password. So far everything is OK.
But when I click on the OK button, the server keeps asking for me authenticate as if my login informations was incorrect (I've triple checked, the login informations are correct).

Anyone has an idea to solve this rebellious problem ? Thanks !

PS : At worst, I can set up an htaccess / htpasswd based auth but I'd rather use the Phil's way Smile


[Solved] [Library] Authentication issue with the Phil Sturgeon's REST-Server library - El Forum - 05-04-2011

[eluser]EpocDotFr[/eluser]
Nobody ? :roll:


[Solved] [Library] Authentication issue with the Phil Sturgeon's REST-Server library - El Forum - 05-05-2011

[eluser]EpocDotFr[/eluser]
I solved the problem with a .htpasswd based authentication, it works, but nobody can really help me for the problem cited above?


[Solved] [Library] Authentication issue with the Phil Sturgeon's REST-Server library - El Forum - 01-18-2012

[eluser]Unknown[/eluser]
This solved the issue for me. Smile
Code:
http://www.besthostratings.com/articles/http-auth-php-cgi.html

I've added this to my .htaccess file:
Code:
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

et voilá!