Once we run the program, the HTTP server will start locally listening on port 8080.
Once the server starts, accessing http://localhost:8080 in a browser will prompt you to enter a username and password. Providing it as admin, admin respectively will render Hello World! on the screen, and for every other combination of username and password it will render You are Unauthorized to access the application.
To access the server from the command line we have to provide the --user flag as part of the curl command, as follows:
$ curl --user admin:admin http://localhost:8080/Hello World!
We can also access the server using a base64 encoded token of username:password, which we can get from any website, such as https://www.base64encode.org/ ...