Hi. I am new to Spring Security. I am trying to implement spring security for restricting web page access to users carrying specific roles. I just want to set user service values like username and authorities with userDomain bean values which is in session scope. The structure of UserDomain bean is :
RoleEntity has role as string variable.Code:public class UserDomain { private String userName; private List<RoleEntity> userRole; resp getters and setters... }
In application context.xml, it has been defined. Now in spring security.xml, how do I set user service values:
How do I map values? Also, I dont want to define userdomain in spring-securty file again. I want to use bean id variable defined in application-context.xml file only.Code:<authentication-manager> <authentication-provider> <user-service> <user name="username" password="123456" authorities="ROLE_USER" /> </user-service> </authentication-provider> </authentication-manager>


Reply With Quote
. Actually I have come aroubnd two approaches. One is to define custom manager (