Class EventAuditingAttributeChangeListener

java.lang.Object
org.keycloak.userprofile.EventAuditingAttributeChangeListener
All Implemented Interfaces:
AttributeChangeListener

public class EventAuditingAttributeChangeListener extends Object implements AttributeChangeListener
AttributeChangeListener to audit user profile attribute changes into Event. Adds info about user profile attribute change into Event's detail field.
Author:
Vlastimil Elias <velias@redhat.com>
See Also:
  • Constructor Details

    • EventAuditingAttributeChangeListener

      public EventAuditingAttributeChangeListener(UserProfile profile, EventBuilder event)
      Parameters:
      profile - used to read attribute configuration from
      event - to add detail info into
  • Method Details

    • onChange

      public void onChange(String attributeName, UserModel userModel, List<String> oldValue)
      Description copied from interface: AttributeChangeListener
      Method called for each user attribute change.
      Specified by:
      onChange in interface AttributeChangeListener
      Parameters:
      attributeName - of the changed user attribute
      userModel - model where new attribute value is applied already (can be null if attribute is removed)
      oldValue - of the attribute before the change (can be null)