From 83c0f537ce2530f477b2cf7880275ff313a2c2ad Mon Sep 17 00:00:00 2001 From: mposolda Date: Sat, 11 Jul 2015 11:29:46 +0200 Subject: [PATCH] Minor update in docs --- docbook/reference/en/en-US/modules/kerberos.xml | 2 +- .../reference/en/en-US/modules/user-federation.xml | 4 ++++ .../testsuite/federation/LDAPExampleServlet.java | 12 +----------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/docbook/reference/en/en-US/modules/kerberos.xml b/docbook/reference/en/en-US/modules/kerberos.xml index 3a858a15bb..d262a1d9db 100644 --- a/docbook/reference/en/en-US/modules/kerberos.xml +++ b/docbook/reference/en/en-US/modules/kerberos.xml @@ -216,7 +216,7 @@ ktadd -k /tmp/http.keytab HTTP/www.mydomain.org@MYDOMAIN.ORG GSS credential will need to be used by your application. So you need to enable built-in gss delegation credential protocol mapper in admin console for your application. This will cause that Keycloak will deserialize GSS credential and transmit it to the application in access token. Application will need to deserialize it and use it for further GSS calls against other services. We have an example, which is showing it in details. It's in examples/kerberos - in the Keycloak appliance distribution or WAR distribution download. You can also check the example sources directly here . + in the Keycloak example distribution or demo distribution download. You can also check the example sources directly here . Once you deserialize the credential from the access token to the GSSCredential object, then GSSContext will need to diff --git a/docbook/reference/en/en-US/modules/user-federation.xml b/docbook/reference/en/en-US/modules/user-federation.xml index c8e9856a3c..58a8727c06 100755 --- a/docbook/reference/en/en-US/modules/user-federation.xml +++ b/docbook/reference/en/en-US/modules/user-federation.xml @@ -208,6 +208,10 @@ more attribute mappings (For example to street, postalCode etc), delete firstName/lastname mapper and put fullName mapper instead, add role mappers etc. Admin console provides tooltips, which should help on how to configure corresponding mappers. + + We have an example, which is showing LDAP integration and set of base mappers and sample mappers (mappers for street and postalCode) . It's in examples/ldap + in the Keycloak example distribution or demo distribution download. You can also check the example sources directly here . +
Writing your own User Federation Provider diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/LDAPExampleServlet.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/LDAPExampleServlet.java index a629ddbca8..80bc9f0e84 100644 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/LDAPExampleServlet.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/LDAPExampleServlet.java @@ -36,17 +36,7 @@ public class LDAPExampleServlet extends HttpServlet { out.println(); for (Map.Entry claim : idToken.getOtherClaims().entrySet()) { - Object value = claim.getValue(); - - if (value instanceof List) { - List asList = (List) value; - StringBuilder result = new StringBuilder(); - for (String item : asList) { - result.append(item + "
"); - } - value = result.toString(); - } - + String value = claim.getValue().toString(); out.printf("%s%s", claim.getKey(), value); out.println(); }