Using Password Protection
<h3 class="heading-h6"><a name="THDLToolboxhomegtDevelopersZonegtPasswordProtection" class="anchorpoint"></a><a href="/tools/wiki/home.html">THDL Toolbox</a> > <a href="/tools/wiki/Developers%27%20Zone.html">Developers' Zone</a> > Password Protection</h3><p class="paragraph">
</p><h3 class="heading-h1"><a name="HowtoPasswordProtectAccesstoaSection" class="anchorpoint"></a>How to Password Protect Access to a Section</h3><p class="paragraph"><strong class="bold">Contributor(s)</strong>: Than Garson</p><p class="paragraph">There are different methods for password protecting a section depending on whether the files to be accessed are HTML or XML. If the section is a folder containing HTML files, one can use place a .htaccess file in the folder to password protect any access to that folder. However, if they are XML files, this cannot be done because we use the show.php and showEssay.php scripts to make calls to the Saxon Servlet which is running on another port. The SaxonServlet then tries to access the XML files on the regular port 80 (<img src="/" alt="external link: " title="external link"/><span class="nobr"><a href="http://orion.lib.virginia.edu/" target="rwikiexternal">http://orion.lib.virginia.edu/</a></span>). If the folder is password protected, the SaxonServlet is not allowed to view the XML document and it "crashes". Thus, another method has to be employed for password protected folders with XML in it. This method uses cookies and is not absolutely secure, but secure enough to deter the average user.</p><p class="paragraph">Because we are shifting to the exclusive use of XML, this process will be described first. However, it has only been done in one particular instance, namely the JIATS journal pages. It will need to be modified and generalized to work with general XML files. I will need to work this up, but for now am documenting what I did for the journal.</p><ul class="star"><li><a href="/tools/wiki/Password%20Protecting%20XML%20with%20PHP.html">Password Protecting XML with PHP</a></li>
<li><a href="/tools/wiki/Password%20Protecting%20a%20Folder%20with%20.htaccess.html">Password Protecting a Folder with .htaccess</a></li></ul><p class="paragraph">
</p><h3 class="heading-h6"><a name="ProvidedforunrestrictedusebythespanclassnobrimgsrcsakairwikitoolimagesicklearrowgifaltexternallinktitleexternallinkahrefhttpwwwthdlorgtargetrwikiexternalTibetanandHimalayanDigitalLibraryaspan" class="anchorpoint"></a><em class="italic">Provided for unrestricted use by the <span class="nobr"><img src="/" alt="external link: " title="external link"/><a href="http://www.thdl.org" target="rwikiexternal">Tibetan and Himalayan Digital Library</a></span></em></h3><p class="paragraph"><span style="color: white;"><a href="/tools/wiki/Developers%20Zone.html">Developers Zone</a></span></p>