src/main/java/org/tinyradius/test/TestServer.java
public RadiusPacket accessRequestReceived(AccessRequest accessRequest, InetSocketAddress client)
                throws RadiusException {
                System.out.println("Received Access-Request:\n" + accessRequest);
                RadiusPacket packet = super.accessRequestReceived(accessRequest, client);
                if (packet.getPacketType() == RadiusPacket.ACCESS_ACCEPT) {
                    packet.addAttribute("Reply-Message", "Welcome " + accessRequest.getUserName() + "!");
                }
                if (packet == null) {
                    System.out.println("Ignore packet.");
                }
                else {
                    System.out.println("Answer:\n" + packet);
                }
                return packet;
            }
// Adds an attribute to the Access-Accept packet

Adds an attribute to the Access-Accept packet
Adds an attribute to the Access - Accept packet
public RadiusPacket accessRequestReceived(AccessRequest accessRequest, InetSocketAddress client)
                throws RadiusException {
                System.out.println("Received Access-Request:\n" + accessRequest);
                RadiusPacket packet = super.accessRequestReceived(accessRequest, client);
                if (packet.getPacketType() == RadiusPacket.ACCESS_ACCEPT) {
                    packet.addAttribute("Reply-Message", "Welcome " + accessRequest.getUserName() + "!");
                }
                if (packet == null) {
                    System.out.println("Ignore packet.");
                }
                else {
                    System.out.println("Answer:\n" + packet);
                }
                return packet;
            }
public RadiusPacket accessRequestReceived ( AccessRequest accessRequest , InetSocketAddress client ) throws RadiusException { System . out . println ( "Received Access-Request:\n" + accessRequest ) ; RadiusPacket packet = super . accessRequestReceived ( accessRequest , client ) ; if ( packet . getPacketType ( ) == RadiusPacket . ACCESS_ACCEPT ) { packet . addAttribute ( "Reply-Message" , "Welcome " + accessRequest . getUserName ( ) + "!" ) ; } if ( packet == null ) { System . out . println ( "Ignore packet." ) ; } else { System . out . println ( "Answer:\n" + packet ) ; } return packet ; }
Adds an attribute to the Access-Accept packet
Adds an attribute to the Access - Accept packet