Re: [WebDNA] Using [PROTECT]

This WebDNA talk-list message is from

2014


It keeps the original formatting.
numero = 111392
interpreted = N
texte = --Apple-Mail-3337CF3A-E4CB-4121-922B-E3A2C1F0DFE6 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable The code is pretty standard stuff: Set up a form to collect user and pass. Check to make sure neither are blank, then search your own user .db (not the= built in Webdna one) for user; if found, check for pass. If okay, set the c= ookie. Redirect to the next page and within a showif, check for the cookie value. I= f a match, use showif to display secure page. I also use the cookie authentication, with showifs, to enhance normal pages t= o include protected parts, like more info for a list of officers for example= , or the person's name and a link to logout or a way to update their info, e= tc. etc. I guess you could also do that with [username], but with cookies yo= u can put additional info in more cookies, like what level of access they ge= t which could be a field in your user .db; set all the cookies you want all a= t once. Cookies are my best friend.=20 To keep a session live until they're done, make the cookie a 30 minute cooki= e, then reset it on every page hit ( within the showif). Hope that helps. Terry Wilson=20 Sent from my iPad > On Jun 15, 2014, at 4:01 PM, sgbc cebu wrote: >=20 > can we see the code? thanks >=20 > Jess V. >=20 >=20 >> On Thu, Nov 14, 2013 at 5:21 AM, WebDNA wrote: >> Hey Tom >>=20 >> I would love to see your code :) >>=20 >>=20 >> Regards >>=20 >> Stuart Tremain >> IDFK Web Developments >> AUSTRALIA >> webdna@idfk.com.au >>=20 >>=20 >>=20 >>=20 >>> On 13 Nov 2013, at 6:05 pm, Tom Duke wrote: >>>=20 >>> Stuart, >>>=20 >>> Hi - you'll need to set up a session cookie based authentication method a= nd then check for the cookie at the top of each protected page. >>>=20 >>> I can share code if you want to go that route. >>>=20 >>> Take care >>> - Tom >>>=20 >>>=20 >>>=20 >>>> On 13 November 2013 04:57, WebDNA wrote: >>>> I have been for many years been using the [PROTECT] tag to do exactly a= s it has been designed to do .... but I got to thinking if instead of the ug= ly browser generated username & password I could have a nice HTML login page= that did the same thing. >>>>=20 >>>> Has anyone done anything like this ? >>>>=20 >>>>=20 >>>> Regards >>>>=20 >>>> Stuart Tremain >>>> IDFK Web Developments >>>> AUSTRALIA >>>> webdna@idfk.com.au >>> --------------------------------------------------------- This message i= s sent to you because you are subscribed to the mailing list . To unsubscrib= e, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Report= ing: support@webdna.us >>=20 >> --------------------------------------------------------- This message is= sent to you because you are subscribed to the mailing list . To unsubscribe= , E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporti= ng: support@webdna.us >=20 > --------------------------------------------------------- This message is s= ent to you because you are subscribed to the mailing list . To unsubscribe, E= -mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting:= support@webdna.us --Apple-Mail-3337CF3A-E4CB-4121-922B-E3A2C1F0DFE6 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
The code is pretty standard stuff:

Set up a form to collect user and pass.

=
Check to make sure neither are blank, then search your own user .= db (not the built in Webdna one) for user; if found, check for pass. If okay= , set the cookie.

Redirect to the next page and wit= hin a showif, check for the cookie value. If a match, use showif to display s= ecure page.

I also use the cookie authentication, w= ith showifs, to enhance normal pages to include protected parts, like more i= nfo for a list of officers for example, or the person's name and a link to l= ogout or  a way to update their info, etc. etc. I guess you could also d= o that with [username], but with cookies you can put additional info in more= cookies, like what level of access they get which could be a field in your u= ser .db; set all the cookies you want all at once. Cookies are my best frien= d. 

To keep a session live until they're done,= make the cookie a 30 minute cookie, then reset it on every page hit ( withi= n the showif).

Hope that helps.
Terry Wil= son 

Sent from my iPad

On Jun 15, 2014, at 4:01 PM= , sgbc cebu <sgbccebu@gmail.com= > wrote:

can= we see the code? thanks

Jess V.


On Thu, Nov 14, 2= 013 at 5:21 AM, WebDNA <webdna@idfk.com.au> wrote:
Hey Tom
I would love to see your code :)


Regards

Stuart Tremain
IDFK Web Deve= lopments
AUSTRALIA




On 13 Nov 2013, at 6:05 pm, Tom D= uke <tom@revo= lutionaries.ie> wrote:

Stuart,

Hi - you'll need to set up a session cookie based= authentication method and then check for the cookie at the top of each prot= ected page.

I can share code if you want to go that= route.

Take care
- Tom


<= /div>

On 13 Novembe= r 2013 04:57, WebDNA <webdna@idfk.com.au> wrote:
I have been for many years been using the [PRO= TECT] tag to do exactly as it has been designed to do .... but I got to thin= king if instead of the ugly browser generated username & password I coul= d have a nice HTML login page that did the same thing.

Has anyone done anything like this ?


Regards

Stuart Tremain
IDFK Web Developments
AUSTRALIA
webdna@idfk.com.au
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: suppor= t@webdna.us

=
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: suppor= t@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.= webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us= --Apple-Mail-3337CF3A-E4CB-4121-922B-E3A2C1F0DFE6-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Using [PROTECT] (Terry Wilson 2014)
  2. Re: [WebDNA] Using [PROTECT] (sgbc cebu 2014)
  3. Re: [WebDNA] Using [PROTECT] (WebDNA 2013)
  4. Re: [WebDNA] Using [PROTECT] (Tom Duke 2013)
  5. [WebDNA] Using [PROTECT] (WebDNA 2013)
--Apple-Mail-3337CF3A-E4CB-4121-922B-E3A2C1F0DFE6 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable The code is pretty standard stuff: Set up a form to collect user and pass. Check to make sure neither are blank, then search your own user .db (not the= built in Webdna one) for user; if found, check for pass. If okay, set the c= ookie. Redirect to the next page and within a showif, check for the cookie value. I= f a match, use showif to display secure page. I also use the cookie authentication, with showifs, to enhance normal pages t= o include protected parts, like more info for a list of officers for example= , or the person's name and a link to logout or a way to update their info, e= tc. etc. I guess you could also do that with [username], but with cookies yo= u can put additional info in more cookies, like what level of access they ge= t which could be a field in your user .db; set all the cookies you want all a= t once. Cookies are my best friend.=20 To keep a session live until they're done, make the cookie a 30 minute cooki= e, then reset it on every page hit ( within the showif). Hope that helps. Terry Wilson=20 Sent from my iPad > On Jun 15, 2014, at 4:01 PM, sgbc cebu wrote: >=20 > can we see the code? thanks >=20 > Jess V. >=20 >=20 >> On Thu, Nov 14, 2013 at 5:21 AM, WebDNA wrote: >> Hey Tom >>=20 >> I would love to see your code :) >>=20 >>=20 >> Regards >>=20 >> Stuart Tremain >> IDFK Web Developments >> AUSTRALIA >> webdna@idfk.com.au >>=20 >>=20 >>=20 >>=20 >>> On 13 Nov 2013, at 6:05 pm, Tom Duke wrote: >>>=20 >>> Stuart, >>>=20 >>> Hi - you'll need to set up a session cookie based authentication method a= nd then check for the cookie at the top of each protected page. >>>=20 >>> I can share code if you want to go that route. >>>=20 >>> Take care >>> - Tom >>>=20 >>>=20 >>>=20 >>>> On 13 November 2013 04:57, WebDNA wrote: >>>> I have been for many years been using the [protect] tag to do exactly a= s it has been designed to do .... but I got to thinking if instead of the ug= ly browser generated username & password I could have a nice HTML login page= that did the same thing. >>>>=20 >>>> Has anyone done anything like this ? >>>>=20 >>>>=20 >>>> Regards >>>>=20 >>>> Stuart Tremain >>>> IDFK Web Developments >>>> AUSTRALIA >>>> webdna@idfk.com.au >>> --------------------------------------------------------- This message i= s sent to you because you are subscribed to the mailing list . To unsubscrib= e, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Report= ing: support@webdna.us >>=20 >> --------------------------------------------------------- This message is= sent to you because you are subscribed to the mailing list . To unsubscribe= , E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporti= ng: support@webdna.us >=20 > --------------------------------------------------------- This message is s= ent to you because you are subscribed to the mailing list . To unsubscribe, E= -mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting:= support@webdna.us --Apple-Mail-3337CF3A-E4CB-4121-922B-E3A2C1F0DFE6 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
The code is pretty standard stuff:

Set up a form to collect user and pass.

=
Check to make sure neither are blank, then search your own user .= db (not the built in Webdna one) for user; if found, check for pass. If okay= , set the cookie.

Redirect to the next page and wit= hin a showif, check for the cookie value. If a match, use showif to display s= ecure page.

I also use the cookie authentication, w= ith showifs, to enhance normal pages to include protected parts, like more i= nfo for a list of officers for example, or the person's name and a link to l= ogout or  a way to update their info, etc. etc. I guess you could also d= o that with [username], but with cookies you can put additional info in more= cookies, like what level of access they get which could be a field in your u= ser .db; set all the cookies you want all at once. Cookies are my best frien= d. 

To keep a session live until they're done,= make the cookie a 30 minute cookie, then reset it on every page hit ( withi= n the showif).

Hope that helps.
Terry Wil= son 

Sent from my iPad

On Jun 15, 2014, at 4:01 PM= , sgbc cebu <sgbccebu@gmail.com= > wrote:

can= we see the code? thanks

Jess V.


On Thu, Nov 14, 2= 013 at 5:21 AM, WebDNA <webdna@idfk.com.au> wrote:
Hey Tom
I would love to see your code :)


Regards

Stuart Tremain
IDFK Web Deve= lopments
AUSTRALIA




On 13 Nov 2013, at 6:05 pm, Tom D= uke <tom@revo= lutionaries.ie> wrote:

Stuart,

Hi - you'll need to set up a session cookie based= authentication method and then check for the cookie at the top of each prot= ected page.

I can share code if you want to go that= route.

Take care
- Tom


<= /div>

On 13 Novembe= r 2013 04:57, WebDNA <webdna@idfk.com.au> wrote:
I have been for many years been using the [PRO= TECT] tag to do exactly as it has been designed to do .... but I got to thin= king if instead of the ugly browser generated username & password I coul= d have a nice HTML login page that did the same thing.

Has anyone done anything like this ?


Regards

Stuart Tremain
IDFK Web Developments
AUSTRALIA
webdna@idfk.com.au
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: suppor= t@webdna.us

=
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: suppor= t@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.= webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us= --Apple-Mail-3337CF3A-E4CB-4121-922B-E3A2C1F0DFE6-- Terry Wilson

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:

Setting up shop (1997) [Announce]: Web server security and password protection (1997) [WebDNA] Ping....testing....1..2..3.. (2009) WebCat2final1 crashes (1997) [WebDNA] Test - ignore (2019) I'm having trouble using [url][interpret][math] together inlookup (1997) changing banners on a page without refresh? (2000) Help!!!! Purchases not going through! (1997) Search Title Question (1998) printing twice? and fix (1997) Re2: Calculating multiple shipping... (1997) SQL Support in 6.0 (2004) To use GREP to boldface text (2003) Re:Off Topic: Frames Killer? (1998) Access Denied! But why? (1997) Make sure I understand this??? (1997) Forbidden CGI Error (1997) Grouping fields help (2004) using showpage and showcart commands (1996) WebCatalog 2.0 b 15 mac (1997)