public RadiusResponse authenticate(final AccessRequest p, final RadiusAuthenticator authenticator, final int retries)
        throws RadiusException, NoSuchAlgorithmException {
        val auth = Objects.requireNonNullElseGet(authenticator, PAPAuthenticator::new);
        auth.setupRequest(this, p);
        auth.processRequest(p);

        while (true) {
            val reply = transport.sendReceive(p, retries);
            if (reply instanceof AccessChallenge) {
                auth.processChallenge(p, reply);
            } else {
                return reply;
            }
        }
    }
Authenticates using the specified method. For all methods, it is assumed
that the user's password can be found in the User-Password attribute. All
authentication requests automatically contain the Message-Authenticator attribute.

@param p             RadiusPacket to be send (should be AccessRequest)
@param authenticator the authenticator
@param retries       Number of times to retry (without response)
@return Returns the reply RadiusPacket
@throws RadiusException          the radius exception
@throws NoSuchAlgorithmException the no such algorithm exception
support/cas-server-support-radius-core/src/main/java/net/jradius/client/RadiusClient.java