OneStopFAQs.com - World's Largest Collection of Frequently Asked Questions
Tuesday, September 2, 2014 Home| Ask Questions| About Us| Feedback| Contact Us|
 Common FAQs  
 Our Services  
FAQs PROGRAMMING LANGUAGES CGI PROGRAMMING DETAILS
A D V E R T I S E M E N T


Question :
Can I do HTTP authentication using CGI?
Category CGI Programming Interview Questions
Rating (0.4) By 4 users
Added on 4/30/2009
Views 209
Rate it!
Answers:

It depends on which version of the question you asked.

Yes, you can use CGI to trigger the browser's standard Username/Password
dialogue. Send a response code 401, together with a "WWW-authenticate"
header including details of the the authentication scheme and realm:
e.g. (in a non-NPH script)

Status: 401 Unauthorized to access the document
WWW-authenticate: Basic realm="foobar"
Content-type: text/plain

Unauthorised to access this document

The use you can make of this is server-dependent, and harder,
since most servers expect to deal with authentication before ever
reaching the CGI (eg through .www_acl or .htaccess).
Thus it cannot usefully replace the standard login sequence, although
it can be applied to other situations, such as re-validating a user -
e.g after a certain timeout period or if the same person may need to
login under more than one userid.

What you can never get in CGI is the credentials returned by the user.
The HTTPD takes care of this, and simply sets REMOTE_USER to the
username if the correct password was entered.



If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in OneStopFAQs.com:-

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

       
    Related Questions
    View Answer
    What is CGIWrap, and how does it affect my program?
    View Answer
    What do I need to know about file permissions and "chmod"?
    View Answer
    What is the "CGI Overhead", and should I be worried about it?
    View Answer
    Does CGI create new security risks?
    View Answer
    What do I absolutely need to know?
    View Answer
    o what are in a nutshell the options for webserver programming?
    View Answer
    Should I use CGI or an API?
    View Answer
    Should I use CGI or JAVA?
    View Answer
    When do I need to use CGI?
    View Answer
    Is it a script or a program?
    View Answer

    Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

    Notify me when better answer is posted!
    Email:

    View ALL CGI Programming Interview Questions


    Sponsors  

    Google Search

    Google
    Business FAQs, Internet FAQs, Accounts FAQs, Computer FAQs, Insurance FAQs, Frequently Asked Questions & Related Pages


    Arts and Entertainment Frequently Asked Questions | Business Frequently Asked Questions | Computers Frequently Asked Questions | Programming Languages Frequently Asked Questions | Education Frequently Asked Questions | Electronic gadgets Frequently Asked Questions | Health Frequently Asked Questions | People and Relationships Frequently Asked Questions | Food and Cooking Frequently Asked Questions | History Politics and Society Frequently Asked Questions | Home, Farm and Garden Frequently Asked Questions | Insurance Frequently Asked Questions | Jobs & Careers Frequently Asked Questions | Law and Legal Issues Frequently Asked Questions | Money and Credit Frequently Asked Questions | Science and Technology Frequently Asked Questions | Religion and Spirituality Frequently Asked Questions | Shopping Frequently Asked Questions | Sports Frequently Asked Questions | Travels Frequently Asked Questions | Animal Life Frequently Asked Questions | Literature and Language Frequently Asked Questions | Vehicles Frequently Asked Questions | Plants and Trees Frequently Asked Questions | Miscellaneous Frequently Asked Questions | Software Testing Frequently Asked Questions | Electronics Frequently Asked Questions | Certification Frequently Asked Questions | Web Hosting Frequently Asked Questions | SAP Module Frequently Asked Questions | Database Frequently Asked Questions | Operating System Frequently Asked Questions | Soft Skills Frequently Asked Questions | Hobbies and Collectibles Frequently Asked Questions | Humour and Amusement Corner Frequently Asked Questions | Community life and Leisure Frequently Asked Questions | Street Care and Cleaning Frequently Asked Questions | Technology Frequently Asked Questions | Celebrities Frequently Asked Questions | India Information Frequently Asked Questions | Microsoft Frequently Asked Questions | Multimedia Frequently Asked Questions |
    Copyright © 2005-2014. One Stop FAQs.com. All rights reserved Privacy Policy | Terms and Conditions | About Us
    Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Cool Interview | Discussions World | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Indian Free Ads | Freshers & Experienced Jobs | New Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Web Hosting in India | Free SMS | Quick Site Kit | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Testing Interview Questions | Free Online Exam | The Galz | Fun & Entertainment | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World
    Page URL: http://www.onestopfaqs.com/faqs/24438/Default.asp
    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Greetings