Tony
July 12, 2020, 8:04am
#1
I want to map to a user in my persona project.
here I get the token
KeycloakPrincipal kp = (KeycloakPrincipal) principal;
IDToken idToken = kp.getKeycloakSecurityContext().getIdToken();
What is “unique” so that I can use that as a key to the local mapped user?
id?
email (but this can change)?
thx
Tony
July 17, 2020, 10:06pm
#2
So I am guessing the way is to add a GUID into the user in Keycloak and map that to my project to provide uniqueness (can’t use the email as it can change)?
zonaut
July 18, 2020, 7:44am
#3
The id of a user in Keycloak is a UUID and is unique. You can easily use that one to map local users.
Tony
July 18, 2020, 8:28am
#4
Thankyou…
I see it is passed across in the subject field.