2
0

python-method-access-app-context.xml 1.7 KB

12345678910111213141516171819202122232425262728293031323334
  1. <b:beans xmlns="http://www.springframework.org/schema/security"
  2. xmlns:b="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns:aop="http://www.springframework.org/schema/aop"
  5. xmlns:tx="http://www.springframework.org/schema/tx"
  6. xmlns:security="http://www.springframework.org/schema/security"
  7. xsi:schemaLocation="
  8. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  9. http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
  10. http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">
  11. <global-method-security pre-post-annotations="enabled">
  12. <pre-post-annotation-handling>
  13. <invocation-attribute-factory ref="attributeFactory"/>
  14. <pre-invocation-advice ref="preAdvice"/>
  15. <post-invocation-advice ref="postAdvice"/>
  16. </pre-post-annotation-handling>
  17. </global-method-security>
  18. <b:bean id="attributeFactory" class="org.springframework.security.integration.python.PythonInterpreterPrePostInvocationAttributeFactory"/>
  19. <b:bean id="preAdvice" class="org.springframework.security.integration.python.PythonInterpreterPreInvocationAdvice"/>
  20. <b:bean id="postAdvice" class="org.springframework.security.integration.python.PythonInterpreterPostInvocationAdvice"/>
  21. <b:bean id="service" class="org.springframework.security.integration.python.TestServiceImpl"/>
  22. <authentication-manager>
  23. <authentication-provider>
  24. <user-service>
  25. <user name="bob" password="{noop}bobspassword" authorities="ROLE_A,ROLE_B"/>
  26. </user-service>
  27. </authentication-provider>
  28. </authentication-manager>
  29. </b:beans>