1

JRadiusクライアントをテストするために、Javaでこの小さな例に従っています。しかし、私はこのエラーを受け取り続けます:

Exception in thread "main" net.sf.jradius.exception.UnknownAttributeException: Unknown attribute MS-CHAP-Challenge
at net.sf.jradius.packet.attribute.AttributeFactory.newAttribute(Unknown Source)
at net.sf.jradius.client.auth.MSCHAPv2Authenticator.processRequest(Unknown Source)
at net.sf.jradius.client.RadiusClient.authenticate(Unknown Source)
at lu.restena.zimbra.RestenaAuthenticator.main(RestenaAuthenticator.java:94)

私はすでにすべてのjarを追加しており、インポートも行っています。

私のコード:

        InetAddress remoteInetAddress = InetAddress.getByName(RADIUSname);
        RadiusClient radiusClient;
        radiusClient = new RadiusClient(
                remoteInetAddress,   // InetAddress - Address of remote RADIUS Server
                sharedSecret); // String - Shared Secret for remote RADIUS Server
        AttributeList attributeList;
        attributeList = new AttributeList();
        attributeList.add(new Attr_UserName(username));
        RadiusAuthenticator auth = RadiusClient.getAuthProtocol("mschapv2");
        RadiusPacket request;
        request = new AccessRequest(radiusClient, attributeList);
        request.addAttribute(new Attr_UserPassword(password));
        RadiusPacket reply = radiusClient.authenticate((AccessRequest) request, auth, 5);

エラーは次のとおりです。

RadiusPacket reply = radiusClient.authenticate((AccessRequest) request, auth, 5);

誰でも理由がわかりますか?(私は JRadius の初心者です) ( MSCHAPv2Authenticator.java )

4

1 に答える 1