private void handleServerResponse()

in src/main/java/software/amazon/msk/auth/iam/internals/IAMSaslClient.java [122:134]


    private void handleServerResponse(byte[] challenge) throws IOException {
        //If we got a non-empty server challenge, then the authentication succeeded on the server.
        //Deserialize and log the server response as necessary.
        ObjectMapper mapper = new ObjectMapper();
        AuthenticationResponse response = mapper.readValue(challenge, AuthenticationResponse.class);
        if (response == null) {
            throw new SaslException("Invalid response from server ");
        }
        responseRequestId = response.getRequestId();
        if (log.isDebugEnabled()) {
            log.debug("Response from server: " + response.toString());
        }
    }