Question

Locked

JRADIUS Coding

By yueng_shu_sheng ·
Hi, I developed some code about the JRADIUS in my JSP page but when I include this line: "RadiusPacket reply = radiusClient.authenticate(request2, new MSCHAPv2Authenticator(),5);", it prompt me an error that net.jradius.client.RadiusClient.authentication found but required net.jradius.packet.RadiusPacket.

Below is my code:

<%@page import="net.jradius.packet.attribute.AttributeFactory"%>
<%@page import="net.jradius.packet.attribute.AttributeList"%>
<%@page import="net.jradius.packet.RadiusPacket"%>
<%@page import="net.jradius.packet.AccessRequest"%>
<%@page import="net.jradius.client.RadiusClient"%>
<%@page import="net.jradius.dictionary.Attr_UserName"%>
<%@page import="net.jradius.dictionary.Attr_NASPortType"%>
<%@page import="net.jradius.dictionary.Attr_NASPort"%>
<%@page import="net.jradius.dictionary.Attr_UserPassword"%>
<%@page import="net.jradius.client.auth.MSCHAPv2Authenticator"%>
AttributeFactory.loadAttributeDictionary("net.jradius.dictionary.AttributeDictionaryImpl");
RadiusClient radiusClient = new RadiusClient(InetAddress.getLocalHost(), sharedSecret);

AttributeList attributeList = new AttributeList();

attributeList.add(new Attr_UserName("test"));
attributeList.add(new Attr_NASPortType(Attr_NASPortType.Wireless80211));
attributeList.add(new Attr_NASPort(new Long(1)));

RadiusPacket request2 = new AccessRequest(radiusClient, attributeList);
request2.addAttribute(new Attr_UserPassword("test"));

out.println("Sending:\n" + request2.toString());

RadiusPacket reply = radiusClient.authenticate(request2, new MSCHAPv2Authenticator(),5);

Will appreaciate with the help...

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Networks Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums