public RadiusPacket sendChallengeResponse(String username, String response,
            String clientAddress, byte[] state) throws GuacamoleException {

        if (username == null || username.isEmpty()) {
            logger.error("Challenge/response to RADIUS requires a username.");
            return null;
        }

        if (state == null || state.length == 0) {
            logger.error("Challenge/response to RADIUS requires a prior state.");
            return null;
        }

        if (response == null || response.isEmpty()) {
            logger.error("Challenge/response to RADIUS requires a response.");
            return null;
        }

        return authenticate(username, response, clientAddress, state);

    }
Send a challenge response to the RADIUS server by validating the input and
then sending it along to the authenticate method.

@param username
    The username to send to the RADIUS server for authentication.

@param response
    The response phrase to send to the RADIUS server in response to the
    challenge previously provided.

@param clientAddress
    The IP address of the client, if known, which will be set in as
    the RADIUS client address.

@param state
    The state data provided by the RADIUS server in order to continue
    the RADIUS conversation.

@return
    A RadiusPacket containing the server's response to the authentication
    attempt.

@throws GuacamoleException
    If an error is encountered trying to talk to the RADIUS server.
extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java