我有一个 Spring-WS 服务使用PayloadRootAnnotationMethodEndpointMapping
它有几个拦截器:
<bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
<property name="interceptors">
<list>
<ref local="loggingInterceptor"/>
<ref local="validatingInterceptor"/>
<ref local="securityInterceptor"/>
</list>
</property>
</bean>
我securityIntercetor
是一个Wss4jSecurityInterceptor
拦截器。
一切正常,除了securityIntercetor
在@Endpoint
级别,我希望它在@PayloadRoot
(操作)。
我验证用户的方式是使用UsernameToken
,然后我反对 LDAP 并获取角色,并根据我想要允许/禁止用户执行操作的角色。
我认为没有开箱即用的解决方案。
所以我的问题是:我如何securityIntercetor
才能获得正在调用的操作,以便我可以根据我的设置检查是否允许执行特定操作。
或者,也许你有其他想法。
谢谢。