}
return true;
}
else if (serviceResponse instanceof AuthFailure) {
AuthFailure authFailure = (AuthFailure)serviceResponse;
response.setStatus(Status.CLIENT_ERROR_UNAUTHORIZED, authFailure.getMessage());
}
else {
logger.warn("Unexpected response from CAS server ({}): {}", serviceResponse.getClass(),
serviceResponse);
response.setStatus(Status.SERVER_ERROR_INTERNAL, "CAS server communication problem");