Source:
<code>private AuthenticationStatus authenticate() { if (endpoint.isAuthenticated()) { return AUTHENTICATED; } else if (clientSerializationVersion != serializationService.getVersion()) { return SERIALIZATION_VERSION_MISMATCH; } else if (credentials == null) { logger.severe("Could not retrieve Credentials object!"); return CREDENTIALS_FAILED; } else if (partitionCount != -1 && clientEngine.getPartitionService().getPartitionCount() != partitionCount) { logger.warning("Received auth from " + connection + " with clientUuid " + clientUuid + ", authentication rejected because client has a different partition count. " + "Partition count client expects :" + partitionCount + ", Member partition count:" + clientEngine.getPartitionService().getPartitionCount()); return NOT_ALLOWED_IN_CLUSTER; } else if (clusterId != null && !clientEngine.getClusterService().getClusterId().equals(clusterId)) { logger.warning("Received auth from " + connection + " with clientUuid " + clientUuid + ", authentication rejected because client has a different cluster id. " + "Cluster Id client expects :" + clusterId + ", Member partition count:" + clientEngine.getClusterService().getClusterId()); return NOT_ALLOWED_IN_CLUSTER; } else if (clientEngine.getSecurityContext() != null) { return authenticate(clientEngine.getSecurityContext()); } else if (credentials instanceof UsernamePasswordCredentials) { <START> return verifyClusterName(); <END> } else { logger.severe("Hazelcast security is disabled.\nUsernamePasswordCredentials or cluster-name " + "should be used for authentication!\n" + "Current credentials type is: " + credentials.getClass().getName()); return CREDENTIALS_FAILED; } }</code><technical_language>username password here</technical_language>

Target:
private AuthenticationStatus authenticate() { if (endpoint.isAuthenticated()) { return AUTHENTICATED; } else if (clientSerializationVersion != serializationService.getVersion()) { return SERIALIZATION_VERSION_MISMATCH; } else if (credentials == null) { logger.severe("Could not retrieve Credentials object!"); return CREDENTIALS_FAILED; } else if (partitionCount != -1 && clientEngine.getPartitionService().getPartitionCount() != partitionCount) { logger.warning("Received auth from " + connection + " with clientUuid " + clientUuid + ", authentication rejected because client has a different partition count. " + "Partition count client expects :" + partitionCount + ", Member partition count:" + clientEngine.getPartitionService().getPartitionCount()); return NOT_ALLOWED_IN_CLUSTER; } else if (clusterId != null && !clientEngine.getClusterService().getClusterId().equals(clusterId)) { logger.warning("Received auth from " + connection + " with clientUuid " + clientUuid + ", authentication rejected because client has a different cluster id. " + "Cluster Id client expects :" + clusterId + ", Member partition count:" + clientEngine.getClusterService().getClusterId()); return NOT_ALLOWED_IN_CLUSTER; } else if (clientEngine.getSecurityContext() != null) { return authenticate(clientEngine.getSecurityContext()); } else if (credentials instanceof UsernamePasswordCredentials) { return verifyEmptyCredentialsAndClusterName((PasswordCredentials) credentials); } else { logger.severe("Hazelcast security is disabled.\n" + "Null username and password values are expected.\n" + "Only the cluster name is verified in this case!\n" + "Current credentials type is: " + credentials.getClass().getName()); return CREDENTIALS_FAILED; } }