Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-1965

Include the user resource in the attribute map used by email provider freemarker


    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Optional
    • Resolution: Done
    • Affects Version/s: 1.5.1.Final
    • Fix Version/s: 1.6.0.Final
    • Component/s: None
    • Labels:


      I have a feature request regarding some emails being sent out, like the password-reset mail. It currently looks like this:

      Your administrator has just requested that you update your <realm> account. Click on the link below to start this process.

      This link will expire within <expiration> minutes.

      If you are unaware that your admin has requested this, just ignore this message and nothing will be changed.

      I would like to include the username, and the user full name, and have already figured out how to do this by updating the messages file and the *.ftl files in the email theme.

      But the list of attributes to be used is limited to what is provide through the implementation, and I would like to have it include the user as well. Either a few properties of the user or the full user resource, so I can use any field of the user.

      I know I can fix it by writing a custom module and loading it into my keycloak, overruling the default provider, with a one-liner:

      attributes.put("username", user.getUsername());


      attributes.put("user", user);

      but rather like to see this as the default behaviour, as this would increase the options of message customisation for everyone

        Gliffy Diagrams




              • Assignee:
                stianst Stian Thorgersen
                johanheylen Johan Heylen
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: