private CasConfig config;
public boolean check(Authentication auth, HttpServletRequest request) {
if (auth instanceof CasAuthentication) {
CasAuthentication casAu = (CasAuthentication) auth;
String key = (String) casAu.getAssertion().getAttributes().get("caKey");
if (null != key) {
String text = HttpUtils.getResponseText(StrUtils.concat(config.getCasServer(),
config.getCheckAliveUri(), "?", config.getArtifactName(), "=", key));
return StringUtils.contains(text, "true");
}