[keycloak-user] Use of event.clientId in FreeMarker

GARDAIS Ionel ionel.gardais at tech-advantage.com
Mon Oct 22 08:03:25 EDT 2018


Hi, 

I've configured the localisation and FTL templates to send an email at every successful login. 
I'd like to add, beside the date and the source IP, the client through the user was connected 

However, event.clientId always resolves to null, whereas event.ipAddress and event.date are correct. 

Here is what lies in the .ftl file : 
${msg("eventLoginBody",event.date,event.ipAddress,event.clientId)} 

messages_en.properties contains 
eventLoginSubject=Successful login 
eventLoginBody=A successful login was detected to your account on {0} from {1} for {2}. If this was not you, please contact an admin. 
eventLoginBodyHtml=<p>A successful login was detected to your account on {0} from {1} for {2}. If this was not you, please contact an admin.</p> 


If I logg the event to the console, clientId is correctly set. 


Does EmailTemplateProvider swallow the clientId field ? 
Am I missing something in the template definition ? 


Thanks, 
Ionel 

		

Ionel GARDAIS 
CIO - IT Team manager 


--
232 avenue Napoleon BONAPARTE 92500 RUEIL MALMAISON
Capital EUR 219 300,00 - RCS Nanterre B 408 832 301 - TVA FR 09 408 832 301
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GARDAIS, Ionel.vcf
Type: text/directory
Size: 399 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20181022/da558fca/attachment.bin 


More information about the keycloak-user mailing list