Re: R: Usage ok TOKENAUTH method
Joel Palmius <[email protected]> Wed, 18 Jan 2006 11:28:50 +0100 (CET)
| Newsgroups | gmane.comp.apache.mod-survey.general |
|---|---|
| Message-ID | <[email protected]> |
You can still use FILEAUTH as in previous mail, but add the following on GET string: ?action=display&username=[user]&password=[password] In this case the password backend is a htpasswd file. Here you will get a password dialog only if the username/password combo isn't valid. This method works equally well for DBIAUTH. TOKENAUTH is still only for those cases where there is no password at all. I agree that this is not very well-documented. None of the argument strings for the GET line nor how to handle them (for example in a perl snippet) is. If you are familiar with perl, you can read the authentication procedure in Survey::Handler->handler(), lines 75-222. It is decently well-commented. // Joel On Wed, 18 Jan 2006, Luca Notari wrote: > Hi again, maybe I wrote something that was clear only for me... > > This is what I need (not considering mod_survey syntax): > > To authenticate users WITHOUT the apache window that requests username and > password; > I know that i can append strings for authentication as GET parameters, I can > do it with PHP but how I can do it with perl/mod_survey? I MUST have a > database, or a simple CSV file is enough? I can't find an answer in the > syntax reference; > And, if I MUST have a database, how can I do it? (is there any example in > the documentation)? > > Thanks a lot! > Luca > > -----Messaggio originale----- > Da: [email protected] > [mailto:[email protected]] Per conto di Joel Palmius > Inviato: martedì 17 gennaio 2006 18.12 > A: [email protected] > Oggetto: Re: survey-discussion-list: Usage ok TOKENAUTH method > > Tokenauth isn't for htpasswd files. If you want basic auth with username and > password, use FILEAUTH. TOKENAUTH is only for when you identify yourself > with *one* string, ie a token. The format of the user file in TOKENAUTH is > one token string per line. > > Replace the TOKENAUTH tag with FILEAUTH: > > .. > <FILEAUTH USERFILE="[some htpasswdmade file] /> .. > > // Joel > > > On Tue, 17 Jan 2006, Luca Notari wrote: > >> Hi all, >> I've searched through the new syntax reference >> (mod_survey_syntax_reference.pdf of 3.2.3 pre2 version) for TOKENAUTH >> subtag, in order to use this method of authentication, but I'm not >> able to implement with a simple file; >> >> >> Scope: I have to authenticate some users allowing to do surveys, >> against a simple list (htpasswd-made); Examples in the mailing list >> don't speak about password. >> >> EXAMPLE: >> I have http://mydomain/test.survey and want user01 to do this survey; >> >> This is my SECURITY tag: >> <SECURITY REQAUTH="yes"> >> <TOKENAUTH ARG="token" APPEND="yes" >> USERFILE="/usr/local/mod_survey/token/tokenfile" /> >> <ANSWER LEVEL="user"/> >> <DATA LEVEL="open" /> >> <SOURCE LEVEL="open" /> >> </SECURITY> >> >> Making file "tokenfile": htpasswd -bc tokenfile user01 password And so >> file tokenfile OK; >> >> To reach this survey, in a browser I've typed: >> >> A) http://mydomain/test.survey?action=display&token=user01 (what about >> password???) >> Doesn't work; >> B) >> http://mydomain/test.survey?action=display&token=user01&password=passw >> ord >> Doesn't work; >> C) http://mydomain/test.survey?action=display&token=user01:password >> Doesn't work. >> >> How can I authenticate a user to do a survey, with TOKENAUTH? >> >> Luca Notari >> The Marketing Lab >> [email protected] >> >> Skickat av "Luca Notari" <[email protected]> till survey-discussion >> > Skickat av Joel Palmius <[email protected]> till survey-discussion > > > __________ Informazione NOD32 1.1369 (20060117) __________ > > Questo messaggio h stato controllato dal Sistema Antivirus NOD32 > http://www.nod32.it > > > > Skickat av "Luca Notari" <[email protected]> > till survey-discussion >