ServiceResponse casResponse = ServiceResponseParser.parse(casResponseStr);
if (casResponse instanceof ProxySuccess) {
return ((ProxySuccess)casResponse).getProxyTicket();
}
else if (casResponse instanceof ProxyFailure) {
ProxyFailure pf = (ProxyFailure)casResponse;
logger.warn("Failed to acquire proxy ticket: {} \"{}\"", pf.getCode(), pf.getMessage());
}
else {
logger.warn("Unexpected response from CAS server: {}", casResponse);
}
}