PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, February 19, 2022

[FIXED] Codeigniter Rest server Digest or Basic auth cant login

 February 19, 2022     codeigniter, php, rest     No comments   

Issue

I'm using Phil Sturgeon’s REST Server. I'm having trouble to set up the basic or digest authentication. When calling the method i get the dialog that prompts for username and password even if i write in the correct username and password it wont accept it. How do i troubleshoot this ? Is it my web host that doesnt allow it ?

This is how i set up the auth in rest.php: The rest is default.

$config['rest_auth']         = 'Basic';
$config['auth_source']       = '';
$config['rest_valid_logins'] = array('admin' => 'password');

Solution

I found the solution myself. I had to add this on my .htaccess file.

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]  


Answered By - Tan
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing