Alex Rivera | Logout

Adding new users in Spring Security

Asked 2010-02-08T21:06:28.153
15

I have basic spring security set up in my Spring / Java EE web app. I can restrict access to certain pages and force login (with roles etc.). There needs to be a form where new users can register and specify a login name and password.

I am wondering if, to create new users, I simply query and update the appropriate spring security tables (e.g. using hibernate) as I would for any query, or is there built in functionality to create new users? If I am simply to use a standard DAO to update the users, how should I handle hashing of passwords?

Thanks!

Edit
Report

2 Answers

1

There is no such built in functionality for creating users in spring security. It is implemented only to secure resources based on the rules for users who are trying to login and access resources.

answered 2010-02-08T21:12:24.857
1

To use hash algorithms You can add <password-encoder> to <authentication-provider>.

answered 2010-02-08T21:17:49.157

Your Answer