jQuery password protection?

This is a discussion on jQuery password protection? within the Javascript forums, part of the Development category; I am trying to develop a site for a friend that contains some password-driven content that will be added to ...


Reply
 
LinkBack Thread Tools Display Modes
Old 20th November 2009, 11:09 AM   #1
Member
 
Join Date: Jan 2009
Posts: 67
Thanks: 1
Thanked 0 Times in 0 Posts
trixiemay is on a distinguished road
Default jQuery password protection?

I am trying to develop a site for a friend that contains some password-driven content that will be added to over time.

What is the easiest way to handle this? I am not building a cms and the site will not be database-driven.

Is there a jQuery plugin or something similar to get the functionality?
trixiemay is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!twitter
Reply With Quote
Old 22nd November 2009, 11:31 AM   #2
Member
 
Join Date: Jul 2009
Posts: 91
Thanks: 0
Thanked 7 Times in 7 Posts
Mike Hopley is on a distinguished road
Expertise: (X)HTML / CSS
Experience: Quite Good
Default

Javascript is good for many things, but not security. As javascript is downloaded and executed on the client's computer, they can look inside your JS and simply read your password. If you've obfuscated it, they can still attempt to reverse-engineer the password.

For simple password protection of pages, use .htaccess basic authentication instead.
Mike Hopley is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!twitter
Reply With Quote
Old 22nd November 2009, 07:57 PM   #3
Member
 
Join Date: Jan 2009
Posts: 67
Thanks: 1
Thanked 0 Times in 0 Posts
trixiemay is on a distinguished road
Default

The problem with using .htaccess is that we need to add several passwords for different people to access different pages over time. Is this a realistic option?

BTW The pages secured are of fairly low priority hence the 'quick and dirty' approach.
trixiemay is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!twitter
Reply With Quote
Old 23rd November 2009, 10:31 AM   #4
Member
 
Join Date: Jul 2009
Posts: 91
Thanks: 0
Thanked 7 Times in 7 Posts
Mike Hopley is on a distinguished road
Expertise: (X)HTML / CSS
Experience: Quite Good
Default

Quote:
Originally Posted by trixiemay View Post
The problem with using .htaccess is that we need to add several passwords for different people to access different pages over time. Is this a realistic option?

BTW The pages secured are of fairly low priority hence the 'quick and dirty' approach.
Well, if you have a large number of accounts that are manually maintained, then it will be tedious work -- but that's true whether you're using javascript or .htaccess.

I don't see any advantage of javascript here, except maybe that you're more familiar with it.
Mike Hopley is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!twitter
Reply With Quote
Old 24th November 2009, 02:01 PM   #5
supermod
 
shalom_m's Avatar
 
Join Date: Jan 2009
Location: Or-Yehuda, Israel
Posts: 397
Thanks: 0
Thanked 16 Times in 16 Posts
shalom_m has a spectacular aura aboutshalom_m has a spectacular aura aboutshalom_m has a spectacular aura about
Expertise: (X)HTML / CSS
Experience: Quite Good
Default

Why not use simple password protected directories?
shalom_m is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!twitter
Reply With Quote
Old 25th November 2009, 01:56 AM   #6
Member
 
Join Date: Jan 2009
Posts: 67
Thanks: 1
Thanked 0 Times in 0 Posts
trixiemay is on a distinguished road
Default

So a page needs to go in a separate directory each time?
trixiemay is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!twitter
Reply With Quote
Old 25th November 2009, 05:00 PM   #7
supermod
 
shalom_m's Avatar
 
Join Date: Jan 2009
Location: Or-Yehuda, Israel
Posts: 397
Thanks: 0
Thanked 16 Times in 16 Posts
shalom_m has a spectacular aura aboutshalom_m has a spectacular aura aboutshalom_m has a spectacular aura about
Expertise: (X)HTML / CSS
Experience: Quite Good
Default

Yes, or a group of pages.

It seems a far better solution if you just want simple password protection.

Try it - it's simple enough.
shalom_m is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!twitter
Reply With Quote
Old 25th November 2009, 07:22 PM   #8
Member
 
Join Date: Jan 2009
Posts: 67
Thanks: 1
Thanked 0 Times in 0 Posts
trixiemay is on a distinguished road
Default

Excuse my ignorance as I am more a designer than a programmer...
But what is the specific coding to allow this.
And can I create an .ht access file if the webhost hasn't supplied one?
trixiemay is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!twitter
Reply With Quote
Old 25th November 2009, 08:30 PM   #9
admin
 
saltedm8's Avatar
 
Join Date: Dec 2008
Location: Kent Uk
Posts: 1,461
Blog Entries: 5
Thanks: 13
Thanked 43 Times in 43 Posts
saltedm8 has a reputation beyond reputesaltedm8 has a reputation beyond reputesaltedm8 has a reputation beyond reputesaltedm8 has a reputation beyond reputesaltedm8 has a reputation beyond reputesaltedm8 has a reputation beyond reputesaltedm8 has a reputation beyond reputesaltedm8 has a reputation beyond reputesaltedm8 has a reputation beyond reputesaltedm8 has a reputation beyond reputesaltedm8 has a reputation beyond repute
Expertise: (X)HTML / CSS
Experience: Professional
Default

this should help you http://www.quickonlinetips.com/archi...with-htaccess/
__________________
THePiNcH
saltedm8 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!twitter
Reply With Quote
Old 30th November 2009, 04:06 AM   #10
Member
 
Join Date: Jan 2009
Posts: 67
Thanks: 1
Thanked 0 Times in 0 Posts
trixiemay is on a distinguished road
Default

Thanks for all your help.

I also found a password generator on Dynamic Drive.
trixiemay is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!twitter
Reply With Quote
Reply

Tags
jquery, password, protection

Thread Tools
Display Modes