Sep 09, 2013 Spring Security HTTP Basic Authentication Example. When a web client requests any secured web resources, server sends an HTTP response with status code 401 (Unauthorized) and WWWAuthenticate HTTP header like WWWAuthenticate: Basic realm realm here . And browser pops up a login dialog prompting for User name and Password for that realm.