webservice 查询时校验用户名及其IP
发布时间:2020-12-17 01:11:58 所属栏目:安全 来源:网络整理
导读:? public class AuthenticationHandler extends AbstractHandler {public static ResourceBundle resourceBundle;static { resourceBundle = ResourceBundle.getBundle("sysParam");}public void invoke(MessageContext cfx) throws Exception {if (cfx.getI
?
public class AuthenticationHandler extends AbstractHandler { public static ResourceBundle resourceBundle; static { resourceBundle = ResourceBundle.getBundle("sysParam"); } public void invoke(MessageContext cfx) throws Exception { if (cfx.getInMessage().getHeader() == null) { throw new org.codehaus.xfire.fault.XFireFault("请求必须包含验证信息",org.codehaus.xfire.fault.XFireFault.SENDER); } Element token = cfx.getInMessage().getHeader().getChild( "AuthenticationToken"); if (token == null) { throw new org.codehaus.xfire.fault.XFireFault("请求必须包含身份验证信息",org.codehaus.xfire.fault.XFireFault.SENDER); } String check_usernames = resourceBundle.getString("username"); HashMap (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
热点阅读