KEYCLOAK-3142 - Capture ResourceType that triggers an AdminEvent
Introduced new ResourceType enum for AdminEvents which lists the current supported ResourceTypes for which AdminEvents can be fired. Previously it was difficult for custom EventListeners to figure out which ResourceType triggered an AdminEvent in order to handle it appropriately, effectively forcing users to parse the representation. Having dedicated resource types as a marker on an AdminEvent helps to ease custom EventListener code. We now also allow filtering of admin events by ResourceType in the admin-console. Signed-off-by: Thomas Darimont <thomas.darimont@gmail.com>
This commit is contained in:
1 parent
f91907c8f9
commit
586f6eeece
67 files changed
+702
-293
No files matched your search
@@ -18,7 +18,6 @@
|
||||
package org.keycloak.representations.idm;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Stan Silvert ssilvert@redhat.com (C) 2016 Red Hat Inc.
|
||||
*/
|
||||
public class AdminEventRepresentation {
|
||||
@@ -27,6 +26,7 @@ public class AdminEventRepresentation {
|
||||
private String realmId;
|
||||
private AuthDetailsRepresentation authDetails;
|
||||
private String operationType;
|
||||
private String resourceType;
|
||||
private String resourcePath;
|
||||
private String representation;
|
||||
private String error;
|
||||
@@ -63,6 +63,14 @@ public class AdminEventRepresentation {
|
||||
this.operationType = operationType;
|
||||
}
|
||||
|
||||
public String getResourceType() {
|
||||
return resourceType;
|
||||
}
|
||||
|
||||
public void setResourceType(String resourceType) {
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getResourcePath() {
|
||||
return resourcePath;
|
||||
}
|
||||
@@ -86,5 +94,4 @@ public class AdminEventRepresentation {
|
||||
public void setError(String error) {
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user