So a little background of the situation first:
I have a 3rd party application that has been written only to work within it's directory itself and also only with JSON files.
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.
So my question is the following:
Is there a way that I can leverage .httpasswd
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.
So basically a session hash or something of this nature.
Example:
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
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.