Ensure example code in SPI chapter compiles (#5)
This commit is contained in:
parent
213783ff42
commit
ea0ef24dd3
1 changed files with 10 additions and 0 deletions
|
@ -32,6 +32,9 @@ public class MyEventListenerProviderFactory implements EventListenerProviderFact
|
|||
events = new LinkedList();
|
||||
}
|
||||
|
||||
public void postInit(KeycloakSessionFactory factory) {
|
||||
}
|
||||
|
||||
public EventListenerProvider create(KeycloakSession session) {
|
||||
return new MyEventListenerProvider(events);
|
||||
}
|
||||
|
@ -69,6 +72,11 @@ public class MyEventListenerProvider implements EventListenerProvider {
|
|||
public void close() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEvent(AdminEvent event, boolean includeRepresentation) {
|
||||
// Assume this implementation just ignores admin events
|
||||
}
|
||||
}
|
||||
----
|
||||
|
||||
|
@ -123,6 +131,8 @@ public class MyEventListenerProvider implements EventListenerProvider {
|
|||
emailSender.send(realm, user, "Hello", "Hello plain text", "<h1>Hello html</h1>" );
|
||||
}
|
||||
|
||||
...
|
||||
|
||||
}
|
||||
----
|
||||
|
||||
|
|
Loading…
Reference in a new issue