-
diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-credentials.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-credentials.html
index 38ca069985..dea6b5b3a6 100755
--- a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-credentials.html
+++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-credentials.html
@@ -6,6 +6,7 @@
- Credentials
- Role Mappings
- Sessions +
- Social Links
- Credentials
- Role Mappings
- Sessions +
- Social Links
- Credentials
- Role Mappings
- Sessions +
- Social Links
- Attributes +
- Credentials +
- Role Mappings +
- Sessions +
- Social Links +
- {{realm.realm}} +
- Users +
- {{user.username}} +
- Social Links +
diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-detail.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-detail.html
index f0b32d4b7e..137efdb6b7 100755
--- a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-detail.html
+++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-detail.html
@@ -6,6 +6,7 @@
diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-sessions.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-sessions.html
index b702f2505f..1144c5b2b7 100755
--- a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-sessions.html
+++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-sessions.html
@@ -5,6 +5,7 @@
-
diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-social-links.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-social-links.html
new file mode 100644
index 0000000000..d50ee06ecb
--- /dev/null
+++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-social-links.html
@@ -0,0 +1,33 @@
+
+
+
\ No newline at end of file
diff --git a/services/src/main/java/org/keycloak/services/managers/ModelToRepresentation.java b/services/src/main/java/org/keycloak/services/managers/ModelToRepresentation.java
index 197046b3ea..5919c265ce 100755
--- a/services/src/main/java/org/keycloak/services/managers/ModelToRepresentation.java
+++ b/services/src/main/java/org/keycloak/services/managers/ModelToRepresentation.java
@@ -8,6 +8,7 @@ import org.keycloak.models.Constants;
import org.keycloak.models.RealmModel;
import org.keycloak.models.RequiredCredentialModel;
import org.keycloak.models.RoleModel;
+import org.keycloak.models.SocialLinkModel;
import org.keycloak.models.UserCredentialModel;
import org.keycloak.models.UserModel;
import org.keycloak.representations.idm.AuthenticationProviderRepresentation;
@@ -16,6 +17,7 @@ import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.representations.idm.RealmAuditRepresentation;
import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.representations.idm.RoleRepresentation;
+import org.keycloak.representations.idm.SocialLinkRepresentation;
import org.keycloak.representations.idm.UserRepresentation;
import java.util.ArrayList;
@@ -168,4 +170,12 @@ public class ModelToRepresentation {
rep.setUsername(ClaimMask.hasUsername(model.getAllowedClaimsMask()));
return rep;
}
+
+ public static SocialLinkRepresentation toRepresentation(SocialLinkModel socialLink) {
+ SocialLinkRepresentation rep = new SocialLinkRepresentation();
+ rep.setSocialUsername(socialLink.getSocialUsername());
+ rep.setSocialProvider(socialLink.getSocialProvider());
+ rep.setSocialUserId(socialLink.getSocialUserId());
+ return rep;
+ }
}
diff --git a/services/src/main/java/org/keycloak/services/resources/admin/UsersResource.java b/services/src/main/java/org/keycloak/services/resources/admin/UsersResource.java
index 8dfcf5940e..10ce72d52c 100755
--- a/services/src/main/java/org/keycloak/services/resources/admin/UsersResource.java
+++ b/services/src/main/java/org/keycloak/services/resources/admin/UsersResource.java
@@ -11,6 +11,7 @@ import org.keycloak.models.KeycloakSession;
import org.keycloak.models.ModelDuplicateException;
import org.keycloak.models.RealmModel;
import org.keycloak.models.RoleModel;
+import org.keycloak.models.SocialLinkModel;
import org.keycloak.models.UserCredentialModel;
import org.keycloak.models.UserModel;
import org.keycloak.representations.adapters.action.UserStats;
@@ -18,6 +19,7 @@ import org.keycloak.representations.idm.ApplicationMappingsRepresentation;
import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.representations.idm.MappingsRepresentation;
import org.keycloak.representations.idm.RoleRepresentation;
+import org.keycloak.representations.idm.SocialLinkRepresentation;
import org.keycloak.representations.idm.UserRepresentation;
import org.keycloak.services.email.EmailException;
import org.keycloak.services.email.EmailSender;
@@ -179,6 +181,25 @@ public class UsersResource {
return stats;
}
+ @Path("{username}/social-links")
+ @GET
+ @NoCache
+ @Produces(MediaType.APPLICATION_JSON)
+ public List-
+
+
+
+
+
+-
+
{{user.username}} Social Links
+Provider Name | +Social Username | +
---|---|
{{socialLink.socialProvider}} | +{{socialLink.socialUsername}} | +