开发者

How to customize Spring security Authentication to use 3 parameters?

开发者 https://www.devze.com 2023-03-11 15:01 出处:网络
I am a bit new to Spring Security. Normally, we authenticate users using 2 parameters username and password. I have to configure the authentication process to use 3 parameters, which are account id, u

I am a bit new to Spring Security. Normally, we authenticate users using 2 parameters username and password. I have to configure the authentication process to use 3 parameters, which are account id, username a开发者_如何学JAVAnd password. How should I implement it?


You may simply implement username as a combination of two parameters like account_id@login.


The standard way would be to use a custom WebAuthenticationDetails.

Have a look at this answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号