String name = assertion.getPrincipal().getName();
final UserDetail userDetail = userDetailService.loadDetail(new UsernamePasswordAuthentication(
name, null));
if (null == userDetail) {
logger.error("cannot load {}'s detail from system", name);
throw new UsernameNotFoundException(StrUtils.concat("user ", name, " not found in system"));
}
userDetailChecker.check(userDetail);
return new CasAuthentication(key, userDetail, auth.getCredentials(), userDetail.getAuthorities(),
userDetail, assertion);
} catch (final TicketValidationException e) {