How to restrict public access to a webapplication?

95 views Asked by At

I have created a web application with Spring framework in which users can login/register and other. The client wants to upload the application to a hosting provider so that he can access it.

The problem is that the client doesn't want to be public. He wants to access the URL, prompts him for an user and a password and after that to be able create accounts to the application, login and other stuff.

Any idea how to restrict public access to the application without changing the existing Spring Security authentication mechanism?

1

There are 1 answers

5
kTT On

You can make some additional authorization. For nginx there is http://nginx.org/en/docs/http/ngx_http_auth_basic_module.html where you specify login and password to whole site and then proxy pass it to your spring server.