play-plugins.spring.oauth2-plugin.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:security="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd"> <bean id="oauth2-plugin.expression-handler" class="org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler"> <property name="permissionEvaluator"> <bean class="me.tfeng.play.security.oauth2.OAuth2PermissionEvaluator" /> </property> </bean> <security:global-method-security pre-post-annotations="enabled"> <security:expression-handler ref="oauth2-plugin.expression-handler" /> </security:global-method-security> </beans>