Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Password Policy validation using Spring Security

I have implemented Spring Security v 3.1.1.RELEASE.

On the change password screen, i need to implement the password validation as per the password policy specified.

Policy Example: Must include a mix of alpha-numeric and upper and lower case characters. (A-Z, a-z, 0-9)

Is there any functionality available with Spring Security itself for validating or regex is the easy solution.

like image 912
jijo thomas Avatar asked Apr 27 '26 00:04

jijo thomas


1 Answers

I think not. Spring security take care of password encoding and matching, but doesn't provide any user/password creation feature. So, no password policy.

You could do it yourself with a spring Validator and, as you said, a regex.

like image 94
baraber Avatar answered Apr 29 '26 13:04

baraber



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!