Added about

This commit is contained in:
Luca Frosini 2021-12-07 14:12:56 +01:00
parent 8a023759a8
commit 3ca20138af
3 changed files with 16 additions and 3 deletions

View File

@ -21,7 +21,8 @@ public class GCubeUser implements User {
protected String familyName;
@JsonProperty("email")
protected String eMail;
@JsonProperty("job_title")
protected String jobTitle;
@JsonProperty("picture")
protected String picture;
@ -53,6 +54,11 @@ public class GCubeUser implements User {
return eMail;
}
@Override
public String getAbout() {
return jobTitle;
}
public String getPicture() {
return picture;
}
@ -60,5 +66,5 @@ public class GCubeUser implements User {
public String getMiddleName() {
return middleName;
}
}

View File

@ -27,4 +27,9 @@ public class KeycloakUser extends AccessToken implements User {
return getRealmAccess().getRoles();
}
@Override
public String getAbout() {
return "";
}
}

View File

@ -17,6 +17,8 @@ public interface User {
public String getEmail();
public String getAbout();
public default String getSurnameName() {
return String.format("%s %s", getFamilyName(), getGivenName());
}
@ -24,5 +26,5 @@ public interface User {
public default String getNameSurname() {
return String.format("%s %s", getGivenName(), getFamilyName());
}
}