[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 429
  • Last Modified:

Expert Exchange's: Login USERNAME & PASSWORD Window

Before any of us can get into Expert Exchange we all have to LOGIN.  Automatically a window pops up asking for USERNAME and PASSWORD.  We enter those in and the window data is submitted back to the CGI.

How does Expert Echange do this without using Javascript?  I am using Netscape and it pops up as if the CGI of EE has sent back data trigerring the box to pop up.  

What is the code to do such a thing?  I do not want to use Javascript because I want to pop up such a window for every browser.

Any help would be greatly appreciated!
0
mirror
Asked:
mirror
1 Solution
 
ozoCommented:
Experts Exchange sends back the following HTTP headers:

HTTP/1.0 401 Unauthorized
Date: Fri, 05 Dec 1997 23:11:10 GMT
Server: Apache/1.1.2
Content-type: text/html
WWW-Authenticate: Basic realm="Experts Exchange Customer"


Your browser then gets your USERNAME and PASSWORD, and resends the request with the header:

Authorization: Basic <base64 encoded USERNAME:PASSWORD>
0
 
maholtCommented:
It is not done by any programming in the web page.  It is done with a .htaccess/.htpasswd file.  Any web server documentation should cover this.  It is pretty simple.
http://www.smartek.net/pass/ has a short, yet complete, description of how to set it up.

The authentication is done completely by webserver-browser negotiation.  No CGI programming is involved.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now