JAVA(org.tinyradius) 方法 addAttribute (org.tinyradius) 处理 "Class" 属性
JAVA(org.tinyradius) method addAttribute (org.tinyradius) on processing "Class" attribute
RadiusClient rc = new RadiusClient("xx.xx.xx.xx","0000");
AccountingRequest acc = new AccountingRequest("michael",AccountingRequest.ACCT_STATUS_TYPE_START);
acc.addAttribute("Framed-IP-Address", "1.1.1.1");
acc.addAttribute("Class","Key CL: PT=C");
rc.account(acc);
rc.close();
我尝试通过创建一个 jsp 页面向我的会计服务器发送一个会计请求。
但是,只能接受
acc.addAttribute("Framed-IP-Address", "1.1.1.1")
,使用 acc.addAttribute("Class","Key CL: PT=C")
发送25号属性类型"Class"时发生错误 acc.addAttribute("Class","Key CL: PT=C")
哪里出错了?!
终于找到答案了,属性"Class",需要通过方法添加:
acc.addAttribute(new StringAttribute(25,"Key CL: PT=C"));
RadiusClient rc = new RadiusClient("xx.xx.xx.xx","0000");
AccountingRequest acc = new AccountingRequest("michael",AccountingRequest.ACCT_STATUS_TYPE_START);
acc.addAttribute("Framed-IP-Address", "1.1.1.1");
acc.addAttribute("Class","Key CL: PT=C");
rc.account(acc);
rc.close();
我尝试通过创建一个 jsp 页面向我的会计服务器发送一个会计请求。
但是,只能接受
acc.addAttribute("Framed-IP-Address", "1.1.1.1"),使用
acc.addAttribute("Class","Key CL: PT=C")发送25号属性类型"Class"时发生错误
acc.addAttribute("Class","Key CL: PT=C")哪里出错了?!
终于找到答案了,属性"Class",需要通过方法添加:
acc.addAttribute(new StringAttribute(25,"Key CL: PT=C"));