Repository navigation
Plugin of Event Listener migrating from Wildfly to Quarkus #16677
pabloaleman
started this conversation in
Archive
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi, I write a plugin based on an answer in stackoverflow to write a plugin to set the client ip address in token.
https://stackoverflow.com/questions/67409599/how-add-ipaddres-o-clientaddress-the-token-in-keycloak/69154669#comment126430089_69154669
The plugin works fine in Keycloak 16.
In keycloak 20.0.1 I install the plugin in providers folder, then I activate the listener in "admin/master/console/#/my-realm/realm-settings/events", then I create a client scope in "admin/master/console/#/my-realm/client-scopes"
The data of the client-scope is:
Name: datosConexion
Description: datosConexion
Type: Default
Display on consent screen: On
Include in token scope: On
The mapper data is:
Mapper type: User Session Note
Name: datosConexion
User Session Note: datosConexion
Token Claim Name: datosConexion
Claim JSON Type: String
Add to ID token: On
Add to access token: On
Add to access token response: On
Then in the client configuration in admin/master/console/#/my-realm/clients/6d3db6f1-f3d5-4f63-a9c3-cedcea6c8da5/clientScopes I add a client scope with datosConexion.
For the front end I use Vue, use the javascript plugin available in your documentation, when I login to the application I put a console.log with idTokenParsed but the item datosConexion is not present.
There is any step more to the plugin works?
Thanks a lot
All reactions