[squid-users] Helper doent authentify

Edwin Quijada listas_quijada at hotmail.com
Mon Dec 11 21:56:16 UTC 2017




________________________________
From: squid-users <squid-users-bounces at lists.squid-cache.org> on behalf of Antony Stone <Antony.Stone at squid.open.source.it>
Sent: Monday, December 11, 2017 9:27 PM
To: squid-users at lists.squid-cache.org
Subject: Re: [squid-users] Helper doent authentify

On Monday 11 December 2017 at 22:19:53, Edwin Quijada wrote:

> Hi!
> I am trying to do a helper for use with Squid. I did my helper but it
> doesnt authentify
>
> <?php
>
> $f = fopen("php://stdin", "r");
> while (!(feof($f)))
> {
>     $line = fgets($f);
>     if ($line)
>      {
>         $fields = explode(' ', trim($line));
>         $username = rawurldecode($fields[0]);
>         $password = rawurldecode($fields[1]);
>
>         if ($username=="edwin" &&  $password=="1234")
>          fwrite(STDOUT, "OK\n");
>         else
>          fwrite(STDOUT, "ERR\n");
>     }
> }
> ?>
>
> when I put the values it continues asked me user/password

I think "$f" might be your problem.

See http://freesoftwaremagazine.com/articles/authentication_with_squid/ for


I copied my example from this page. 😞
If I run the script it works fine , returns OK or ERR that is suppose to receive

How to build squid authentication helpers<http://freesoftwaremagazine.com/articles/authentication_with_squid/>
freesoftwaremagazine.com
Have you ever tried to figure out how to make Squid authenticate users according to your own exotic rules? Users are in a DB? Are you using an ActiveDirectory?


what might be a clue (sorry, I'm not really a PHP coder).


Antony.

--
Why is "dylexia" so difficult to spell, and why can I never remember "aphasia"
when I want to?

                                                   Please reply to the list;
                                                         please *don't* CC me.
_______________________________________________
squid-users mailing list
squid-users at lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users
squid-users Info Page<http://lists.squid-cache.org/listinfo/squid-users>
lists.squid-cache.org
squid-users -- General discussion relating to Squid. The membership of this list is thousands of Squid users from around the world About squid-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20171211/947ab760/attachment.html>


More information about the squid-users mailing list