We needed to encode our passwords stored in a simple properties file using SHA 256, and also later base64 encode this hash. A few searches in the Spring documentation, and downloading the sources did the trick.
So, attached below are the configuration changes you need to make for the same:
Add the following entries to your Spring Application Context file:
The property encodeHashAsBase64 if enabled, will give us the base64 encoded string of the hash. The rest-users.properties should now have the username, based 64 encoded password, and all the roles associated to that user.
Simple , easy and elegant.
I will keep posting as and when I discover new things about Spring Security 3.0.4
Interview: Joel Murach, Author of "Murach's Java Programming"
-
Joel Murach works for a technical publishing company called Mike Murach &
Associates that was started by his dad in 1974. Back in those days, most of
their...
3 days ago

0 comments:
Post a Comment