Username Template Importer

1,517 views
Skip to first unread message

Björn Eickvonder

unread,
Sep 22, 2021, 10:24:08 AM9/22/21
to Keycloak Dev
Hi all,
according to the help text it is possible to use "| lowercase" or "| uppercase" in the UsernameTemplateImporter, but I don't see that this is implemented.
I could contribute that and I'd like to extend that further by 
  1. a possibility to replace characters, e.g. "| replace:-_" would replace all dashes by underscore
  2. a possibility to apply a regular expression with a catch group, e.g. "| regex:(.*)@.*" would be effectively a substring before @, for example to strip out the domain if email address is the user name.
  3. To concatenate multiple such operators, e.g. ${CLAIM.preferred_username | uppercase | replace:-_ | regex:(.*)@.*} would transform Max.Mus...@gmx.net into MAX.MUSTER_HANS
What do you think?

Thomas Darimont

unread,
Sep 22, 2021, 11:18:35 AM9/22/21
to Björn Eickvonder, Keycloak Dev

--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/2ad87811-e7fe-494a-a4e7-33a1036d8541n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages