Selasa, 15 Desember 2020

How to enable HTTP Basic Authentication in Spring Security using Java and XML Configuration

In the last article, I have shown you how to enable Spring security in Java application and today we'll talk about how to enable Basic HTTP authentication in your Java web application using Spring Security. I'll show you how to do that using both the Java configuration and XML configuration if you are using Spring Security 3.1 or lower version, but before that let's understand what is Http basic authentication and why do you need that? One of the most common ways to authenticate a user in a web application is by using a form login like you provide a login page and the user will enter his username and password for authentication. This works great for human users but sometimes there are situations where you can't use a login form for authentication.

Lorem ipsum is simply dummy text of the printing and typesetting industry.

Comments


EmoticonEmoticon