在 SpringWS 的春季安全中,我正在使用
<bean id="wsSecurityInterceptor" class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor">
<property name="validationActions" value="UsernameToken" />
<property name="validationCallbackHandler" ref="springSecurityHandler" />
</bean>
<bean id="springSecurityHandler"
class="org.springframework.ws.soap.security.xwss.callback.SpringPlainTextPasswordValidationCallbackHandler">
<property name="authenticationManager" ref="authenticationManager"/>
</bean>
以上配置。但错误是 javax.security.auth.callback.UnsupportedCallbackException
当我在 SpringPlainTextPasswordValidationCallbackHandler 中调试时发现它没有进入循环
protected void handleInternal(Callback callback) throws IOException, UnsupportedCallbackException {
if (callback instanceof PasswordValidationCallback) {
PasswordValidationCallback validationCallback = (PasswordValidationCallback) callback;
if (validationCallback.getRequest() instanceof PasswordValidationCallback.PlainTextPasswordRequest) {
validationCallback.setValidator(new SpringSecurityPlainTextPasswordValidator());
return;
}
}
可能是什么问题,请帮助
谢谢