I need to design a user role management module for online examine tool application, There are several users in the system (Admin, Moderator, Contributor, Examiner). These users have different privileges for the system. I need to use the Spring framework and spring security for the user access system. How do I use the spring security for this module. Can anyone direct me to a good tutorial and your ideas allways welcome.
Asked
Active
Viewed 1.3k times
8
-
2http://stackoverflow.com/questions/8597902/spring-security-user-account-registration-creation-and-management – Pravitha V Aug 21 '12 at 06:24
2 Answers
5
Based on your description, I think that you might be looking at a custom implementation of UserDetailsService
.
It's worth checking out Stephan Gerth's ZK sample project, that integrates Spring, Hibernate, customized Spring security, ZK Ajax, etc. Here you have the announcement post, that has links to source and documentation. I suggest reading the chapter 13.2. Spring-Security (and related), that should help you navigate the source code.

Less
- 3,047
- 3
- 35
- 46
-
Why would he need `a custom implementation of UserDetailsService`? He can achieve what he looks for by a simple Spring Security namespace. In fact there is no need for customization anywhere. All he needs are four `roles` and some basic `intercept-url`. – Matin Kh Aug 21 '12 at 07:21
-
1@Matin Kh I didn't say that it is mandatory, I said that he might need it... Whether he'll use namespace config or customize stuff, really depends on the application itself and the requirements. – Less Aug 21 '12 at 07:34
-
1I mean that's a bad advice. Edit it. Because he is new to Spring Security, and he needs a start up. So he may get confused by configuring some classes which is not necessary. Of course it depends on the application, what configuration he should use. However, from the question we do not see the need of customization. – Matin Kh Aug 21 '12 at 07:39
-
3Matin Kh, if you don't see the need for the customization, and you have an exact solution, do post an answer. @user1599921 If you are new to spring, you should read official documentation to get the idea first, and as far as spring security goes, I certainly recommend reading official API docs, because I read them too when i was starting to learn. [Look here](http://static.springsource.org/spring-security/site/docs/3.0.x/reference/springsecurity-single.html) – Less Aug 21 '12 at 07:56
2
Try this one Spring Authorization and Authentication.A very simple tutorial for beginners.

user1613360
- 1,280
- 3
- 16
- 42