Moderator: Sprite_tm
- the client needs to provide "Authorization" in the header with user/passwd in base64.
- if client doesn't not provide the above, the server simply reply a 401 with 'WWW-Authenticate : Basic realm="MyServer123" ' in his header.
https://en.wikipedia.org/wiki/Basic_acc ... entication
However unless you also add encryption, basic auth does not provide any real security, since the browser sends the username/password with ever get request, which an attacker can easily sniff.
And yes, I know that this is not secure if https is not used, but it is just for basic access control.