Re: Form Authentication
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 35585
interpreted = N
texte = Kalin Mintchev wrote:Hi, Kalin, here are my comments. First I assume that you are giving access through the form login to pages protected to a specific group. Let's say it is the group DEMO> this is what i do:> page #1:> form with input names password and username, action=logon1.html.OK. BTW in my specific implementation I use a members.db that I manage separately from the WebCat users.db. (I do not encrypt username and password in it). As you seems using a db.db maybe you should also try the easy way first and then encrypt everything when ot works. > page #2: logon1.html> [showif NotFound=[lookup> db=/db/db.db&lookinField=user&value=[username]&returnField=user¬Found=NotFound]]> [redirect page1.html]> [/showif]> [showif [password]![lookup> db=/db/db.db&lookinField=user&value=[username]&returnField=pass¬Found=NotFound]]> [redirect page1.html]> [/showif]> [search> db=/db/db.db&groupsword=ww&wogroupsdatarq=DEMO&equserdatarq=[username]&eqpassdatarq=[password]] ^^^^Or pass a [groups] value from the previous page. BTW You also have to pass it to all following pages. > [showif [numFound]=0]> [redirect page1.html]> [/showif]> [/search]> [redirect> http://[encrypt][username]:[password][/encrypt]@www.mysite.com/login2.html]Change this: [redirect http://[username]:[password]@www.mysite.com/login2.html]> page #3: logon2.html> in the header:>
HTTP-EQUIV=REFRESH CONTENT=0;URL=http://www.mysite/protected.html>> the protected page has this in it:You can simply use [protect DEMO] instead of all this:> [showif NotFound=[lookup> db=/db/db.db&lookinField=user&value=[username]&returnField=user¬Found=NotFound]]> [authenticate Unauthorized User]> [/showif]> [showif [password]![lookup> db=/db/db.db&lookinField=user&value=[username]&returnField=pass¬Found=NotFound]]> [authenticate Unauthorized User]> [/showif]> [search> db=/db/db.db&groupsword=ww&wogroupsdatarq=[groups]&equserdatarq=[username]&eqpassdatarq=[password]]> [showif [numFound]=0]> [authenticate Unauthorized User]> [/showif]> [/search]Hope I could help. Brice--Brice Le Blevennec, Digerati, ListDad,
Ex Machina Interactive Architects S.A., Ex Nihilo Uno S.A. &Ex Machina Graphic Design S.P.R.L. Ex Machina Television SPRL NetBusiness S.A. ContactOffice Arkaos S.A. X-Pose 2.0 & Visualizer -------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Kalin Mintchev wrote:Hi, Kalin, here are my comments. First I assume that you are giving access through the form login to pages protected to a specific group. Let's say it is the group DEMO> this is what i do:> page #1:> form with input names password and username, action=logon1.html.OK. BTW in my specific implementation I use a members.db that I manage separately from the WebCat users.db. (I do not encrypt username and password in it). As you seems using a db.db maybe you should also try the easy way first and then encrypt everything when ot works. > page #2: logon1.html> [showif NotFound=[lookup> db=/db/db.db&lookinField=user&value=[username]&returnField=user¬Found=NotFound]]> [redirect page1.html]> [/showif]> [showif [password]![lookup> db=/db/db.db&lookinField=user&value=[username]&returnField=pass¬Found=NotFound]]> [redirect page1.html]> [/showif]> [search> db=/db/db.db&groupsword=ww&wogroupsdatarq=DEMO&equserdatarq=[username]&eqpassdatarq=[password]] ^^^^Or pass a [groups] value from the previous page. BTW You also have to pass it to all following pages. > [showif [numFound]=0]> [redirect page1.html]> [/showif]> [/search]> [redirect> http://[encrypt][username]:[password][/encrypt]@www.mysite.com/login2.html]Change this: [redirect http://[username]:[password]@www.mysite.com/login2.html]> page #3: logon2.html> in the header:> HTTP-EQUIV=REFRESH CONTENT=0;URL=http://www.mysite/protected.html>> the protected page has this in it:You can simply use [protect DEMO] instead of all this:> [showif NotFound=[lookup> db=/db/db.db&lookinField=user&value=[username]&returnField=user¬Found=NotFound]]> [authenticate Unauthorized User]> [/showif]> [showif [password]![lookup> db=/db/db.db&lookinField=user&value=[username]&returnField=pass¬Found=NotFound]]> [authenticate Unauthorized User]> [/showif]> [search> db=/db/db.db&groupsword=ww&wogroupsdatarq=[groups]&equserdatarq=[username]&eqpassdatarq=[password]]> [showif [numFound]=0]> [authenticate Unauthorized User]> [/showif]> [/search]Hope I could help. Brice--Brice Le Blevennec, Digerati, ListDad, Ex Machina Interactive Architects S.A., Ex Nihilo Uno S.A. &Ex Machina Graphic Design S.P.R.L. Ex Machina Television SPRL NetBusiness S.A. ContactOffice Arkaos S.A. X-Pose 2.0 & Visualizer -------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Brice Le Blevennec
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Custom WebCat Prefs ... (1997)
Server Freeze (1998)
form data submission gets truncated (1997)
Showif, Hideif reverse logic ? (1997)
4.x versions (2003)
What port is Email on ? (2000)
Web Catalog 2 demo (1997)
OT: Version Control (2007)
WebCatalog2 Feature Feedback (1996)
requiredfields (2002)
Alternating colors (1997)
[WebDNA] WebDNA for Windows Newbie Questions (2008)
multiple credit card merchant accounts/processors (1997)
Freeze (2003)
[WebDNA] XML Help (2009)
2.0 Info (1997)
url question (2002)
OK, here goes... (1997)
different ship dates and shopping carts -- how to? (1997)
Shopping carts and reloading pages (1997)