title: Hashing passwords - For directory access
body: <p>So a little background of the situation first:</p>
  
  <p>I have a 3rd party application that has been written only to work within it's directory itself and also only with JSON files. </p>
  
  <p>Now the problem I have is that it is all pretty much written in js, jquery and angular. Which means no file can be behind the root directory because javascript is not allowed to call files behind the root directory. Also I would prefer not to expose the file location unless I protect it somehow with some kind of password or session based system. </p>
  
  <p><strong>So my question is the following:</strong></p>
  
  <p>Is there a way that I can leverage <code>.httpasswd</code> or some other technology that will prevent bots or someone accessing data directly or through a url without passing maybe a get param so that it can confirm that they have rights and also have the get param expire so someone can't just simply give this url to someone else and say hey go for it.</p>
  
  <p>So basically a session hash or something of this nature.</p>
  
  <p>Example:</p>
  
  <pre><code>C:/wwwStufff/webRoot/3rdPartyApp/somejsFile
  C:/wwwStufff/webRoot/3rdPartyApp/projectData
  C:/wwwStufff/webRoot/3rdPartyApp/projectData/projects.json
  C:/wwwStufff/webRoot/3rdPartyApp/projectData/project1/project.json
  </code></pre>
  
  <p>So pretty much I want to be able to protect the whole projectData folder anytime someone tries to access a file even a JSON file they have to pass some kind of hash and it will let them access it.</p>