org.jaaslounge.AuthenticatedUser Maven / Gradle / Ivy
package org.jaaslounge;
import java.util.ArrayList;
import java.util.List;
public class AuthenticatedUser {
public static final String SESSION_ATTRIBUTE_NAME = "org.org.jaaslounge.sso.user";
private String name;
private String domain;
private List groups;
public AuthenticatedUser(String name, String domain, List groups) {
String username = name;
String userdomain = domain;
if(name.contains("@") && domain == null) {
String[] split = name.split("@");
if(split.length > 0)
username = split[0];
if(split.length > 1)
userdomain = split[1];
}
this.name = username;
this.domain = userdomain;
this.groups = groups;
}
public AuthenticatedUser(String name, String domain) {
this(name, domain, new ArrayList());
}
public AuthenticatedUser(String name) {
this(name, null, new ArrayList());
}
public String getName() {
return name;
}
public String getDomain() {
return domain;
}
public List getGroups() {
return groups;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy