Created
April 15, 2011 16:12
-
-
Save maggandalf/921965 to your computer and use it in GitHub Desktop.
Configuring Custom Voter In Access Decision Manager.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<security:http auto-config="true" access-decision-manager-ref="accessDecision"> | |
<security:intercept-url pattern="/**" access="ROLE_USER"/> | |
</security:http> | |
<bean id="accessDecision" class="org.springframework.security.access.vote.AffirmativeBased"> | |
<property name="decisionVoters"> | |
<set> | |
<bean class="org.springframework.security.access.vote.RoleVoter"></bean> | |
<bean class="org.example.security.voter.NightVoter"></bean> | |
</set> | |
</property> | |
</bean> | |
<bean id="org.springframework.security.authenticationManager" class="org.springframework.security.authentication.ProviderManager"> | |
<property name="providers"> | |
<set> | |
<ref local="daoProvider"/> | |
</set> | |
</property> | |
</bean> | |
<bean id="daoProvider" class="org.springframework.security.authentication.dao.DaoAuthenticationProvider"> | |
<property name="userDetailsService" ref="inMemory"></property> | |
</bean> | |
<security:user-service id="inMemory"> | |
<security:user name="jimi" password="jimi" authorities="ROLE_USER"/> | |
</security:user-service> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment