KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Before I begin, I've to say the closest answer I've found is here but honestly I don't really understand what's going on there. I'm using Struts2 + Spring Security 2.06 with a custom authentication provider and access decision manager to remove the need for a "ROLE_" prefix. My applicationContext-security.xml looks like this: <beans:bean id="customAuthenticationProvider" class="com.test.testconsole.security.CustomAuthenticationProvider"> <beans:property name="userManagementService" ref="userManagementService"/> <custom-authentication-provider/> </beans:bean> <!--Customize Spring Security's access decision manager to remove need for "ROLE_" prefix--> <beans:bean id="accessDecisionManager" class="org.springframework.security.vote.AffirmativeBased"> <beans:property name="decisionVoters"> <beans:list> <beans:ref bean="roleVoter"/> <beans:ref bean="authenticatedVoter"/> </beans:list> </beans:property> </beans:bean> <beans:bean id="roleVoter" class="org.springframework.security.vote.RoleVoter"> <beans:property name="rolePrefix" value=""/> </beans:bean> <beans:bean id="authenticatedVoter" class="org.springframework.security.vote.AuthenticatedVoter"> </beans:bean> <global-method-security secured-annotations="enabled" access-decision-manager-ref="accessDecisionManager"/> Relevant portion of my web.xml: <!--Spring Security--> <filter
Tags (comma-separated)
Save Edits
Cancel