71 lines
1.2 KiB
Java
71 lines
1.2 KiB
Java
package org.gcube.common.authorization.utils.user;
|
|
|
|
import java.util.Collection;
|
|
import java.util.Set;
|
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
/**
|
|
* @author Luca Frosini (ISTI - CNR)
|
|
*/
|
|
public class GCubeUser implements User {
|
|
|
|
@JsonProperty("id")
|
|
protected String username;
|
|
@JsonProperty("roles")
|
|
protected Set<String> roles;
|
|
|
|
@JsonProperty("given_name")
|
|
protected String givenName;
|
|
@JsonProperty("family_name")
|
|
protected String familyName;
|
|
@JsonProperty("email")
|
|
protected String eMail;
|
|
@JsonProperty("job_title")
|
|
protected String jobTitle;
|
|
|
|
@JsonProperty("picture")
|
|
protected String picture;
|
|
@JsonProperty("middle_name")
|
|
protected String middleName;
|
|
|
|
@Override
|
|
public String getUsername() {
|
|
return username;
|
|
}
|
|
|
|
@Override
|
|
public Collection<String> getRoles() {
|
|
return roles;
|
|
}
|
|
|
|
@Override
|
|
public String getGivenName() {
|
|
return givenName;
|
|
}
|
|
|
|
@Override
|
|
public String getFamilyName() {
|
|
return familyName;
|
|
}
|
|
|
|
@Override
|
|
public String getEmail() {
|
|
return eMail;
|
|
}
|
|
|
|
@Override
|
|
public String getAbout() {
|
|
return jobTitle;
|
|
}
|
|
|
|
public String getPicture() {
|
|
return picture;
|
|
}
|
|
|
|
public String getMiddleName() {
|
|
return middleName;
|
|
}
|
|
|
|
}
|