The last problem is caused by the user reply message attribute is depracted. Now, I think get multiple reply message
attributes, so I add a new dictionary file, the below is my ut
codes: RadiusPacket reply = null; try { reply = rc.authenticate(request, new
MSCHAPv2Authenticator(), 5); } catch (UnknownAttributeException
e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (RadiusException
e) { // TODO Auto-generated catch block e.printStackTrace(); } catch(Exception e) { e.printStackTrace(); } if (reply == null) return; // Request Timed-out System.out.println("Received:\n"
+ reply.toString()); boolean isAuthenticated = (reply instanceof AccessAccept); Long replyMessage =
null; try { AttributeList al = reply.getAttributes(); String replyMessage1 = (String) reply.getAttributeValue("Auth-Type"); replyMessage = (Long) reply.getAttributeValue("TDTech-ACL"); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } if (replyMessage != null) { System.out.println("Reply
Message: " + replyMessage); } but the exception is Received: Class: class net.sf.jradius.packet.AccessAccept Attributes: Framed-IP-Address = 192.168.162.219 Unknown-VSAttribute(8888:1) = [Binary Data (length=13)] MS-CHAP2-Success = [Binary Data (length=43)] MS-MPPE-Recv-Key = [Binary Data (length=34)] MS-MPPE-Send-Key = [Binary Data (length=34)] MS-MPPE-Encryption-Policy = [Binary Data (length=4)] MS-MPPE-Encryption-Types = [Binary Data (length=4)] net.sf.jradius.exception.UnknownAttributeException: Unknown attribute TDTech-ACL at net.sf.jradius.packet.attribute.AttributeFactory.getTypeByName(AttributeFactory.java:320) at net.sf.jradius.packet.attribute.AttributeList.get(AttributeList.java:195) at net.sf.jradius.packet.RadiusPacket.findAttribute(RadiusPacket.java:227) at net.sf.jradius.packet.RadiusPacket.getAttributeValue(RadiusPacket.java:256) at test.security.jradius.JRadiusClient.main(JRadiusClient.java:74)
Thanks! 周勇军 TD-TECH OMC 021-50992135 -----Original Message----- I get the reply message in java
application from freeradius, but the reply message
have only usergroup reply message and no user reply
message. Why? Thanks! 周勇军 TD-TECH OMC 021-50992135 - List info/subscribe/unsubscribe?
See http://www.freeradius.org/list/users.html Thanks! 周勇军 TD-TECH OMC 021-50992135 |
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html