}
public List<String> getUserRoles() {
if (request.getUserPrincipal() instanceof GenericPrincipal) {
final GenericPrincipal wp = (GenericPrincipal) request
.getUserPrincipal();
if (wp.getRoles() != null) {
final List<String> roles = Arrays.asList(wp.getRoles());
log.debug("GenericPrincipal roles: " + roles);
return roles;
}
}
if (request.getUserPrincipal() instanceof WindowsPrincipal) {
final WindowsPrincipal wp = (WindowsPrincipal) request
.getUserPrincipal();
log.debug("WindowsPrincipal roles: " + wp.getRolesString());
log.debug("WindowsPrincipal groups: " + wp.getGroups());
if (wp.getRolesString() != null) {
return Arrays.asList(wp.getRolesString().split(","));
}
}
/*if (this.request.getUserPrincipal() instanceof ActiveDirectoryPrincipal) {
final ActiveDirectoryPrincipal ap = (ActiveDirectoryPrincipal) this.request