Validate the user in AngularJS without any back end calls or Databases
I have created a static website using AngularJS. I am not using any backend calls or database. But I would like to have a login page where the user enters a password (password same for the site users as the site is for internal purposes only), if the password is correct then i take user to the home page else take them back to login scree. I am using Apache Web Server. Is there a way to achieve a safe validation/authentication in AngularJS without Tomcat/Database/Cookies etc ?
Note: I don't want to store username and password in any .js file in a way that it is exposed to any user.
Sample tutorial: Encrypt cookies in browser.
One option is to add HTTP basic auth to your app. If you host your app with Aerobatic, you might configure this in your package.json like so (note that you can optionally add auth to specific directories):