casProfile = new CasProxyProfile();
} else {
casProfile = new CasProfile();
}
casProfile.setId(principal.getName());
casProfile.addAttributes(principal.getAttributes());
if (this.casProxyReceptor != null) {
((CasProxyProfile) casProfile).setPrincipal(principal);
}
logger.debug("casProfile : {}", casProfile);
return casProfile;