[keycloak-dev] Keycloak 1.9.1: Theme: pass eventtype to eventlistener?

christian.polzer at kaufland.com christian.polzer at kaufland.com
Wed Apr 12 10:02:32 EDT 2017



Hello,

I have implemented a custom EventListenerProvider to use with a custom
registration form template ("login/register.ftl").
Now I am having problems distinguishing incoming events from the login.ftl,
register.ftl and so on templates. as I understand it in my
EventListenerProvider the entry point is the implemented onEvent(Event
event)method.

Unfortunatelly the events that get passed through from the template to the
keycloak backend into my EventListenerProvider seem to be missing event
type information:
Incoming Event is:{
"clientId": "internet-master-client",
"details": {
   "auth_method": "openid-connect",
   "auth_type": "code",
   "code_id": "5ba2de19-e7f4-4274-9054-d71343c21c96",
   "email": "test at test.com",
   "redirect_uri": "https://www.test.com/",
   "username": "test at test.com"
},
"ipAddress": "...",
"realmId": "users",
"time": 1492001884000,
"type": {"saveByDefault": true}, // type is not set?
"userId": "b...."

}

This makes it impossible for me to distinguish between EventTypes and send
Mail accordingly.

What am I missing (apart from beeing new to keycloak development)?

Regards,

Christian Polzer

Mit freundlichen Grüßen
Christian Polzer

Anwendungsentwicklung NonSAP
+49 7132 94 920383

Kaufland Informationssysteme GmbH & Co. KG
Postfach 12 53 - 74172 Neckarsulm
Kommanditgesellschaft
Sitz: Neckarsulm
Registergericht: Stuttgart HRA 104163


More information about the keycloak-dev mailing list