Custome Protocol Mapper - Error Handling

88 views
Skip to first unread message

robs0n

unread,
Jun 22, 2022, 5:44:32 AM6/22/22
to Keycloak User
Hi, everybody!

We implemented a custom protocol mapper to extend the IdToken of an authenticated user by specific claims. The information stored within these claims is fetched from an external service. For that we use the setClaim method within the mapper. If something goes wrong here we throw a RuntimeException.

Our goal is if something goes wrong within the mapper to break the login process and to invalidate the login session and cookies at this point. Is this possible within the mapper itself? How could we achive this?

btw: The mapper is used within a custom defined client scope. This client scope is assigned to several clients.

Thanks!

Robert
Reply all
Reply to author
Forward
0 new messages