KEYCLOAK-1125 Update provider documentation and example and add instructions on using jboss-cli to create module
This commit is contained in:
parent
fcc2e0a9f0
commit
969b1bf33c
1 changed files with 12 additions and 6 deletions
|
@ -95,10 +95,14 @@ public class MyEventListenerProvider implements EventListenerProvider {
|
|||
<section>
|
||||
<title>Register a provider using Modules</title>
|
||||
<para>
|
||||
To register a provider using Modules first create a module. To do this you have to create a folder inside
|
||||
KEYCLOAK_HOME/modules and add your jar and a <literal>module.xml</literal>. For example to add the event listener
|
||||
sysout example provider create the folder <literal>KEYCLOAK_HOME/modules/org/keycloak/examples/event-sysout/main</literal>.
|
||||
Copy <literal>event-listener-sysout-example.jar</literal> to this folder and create <literal>module.xml</literal>
|
||||
To register a provider using Modules first create a module. To do this you can either use the jboss-cli
|
||||
script or manually create a folder inside KEYCLOAK_HOME/modules and add your jar and a <literal>module.xml</literal>.
|
||||
For example to add the event listener sysout example provider using the jboss-cli script execute:
|
||||
<programlisting><![CDATA[{
|
||||
KEYCLOAK_HOME/bin/jboss-cli.sh --command="module add --name=org.keycloak.examples.event-sysout --resources=event-listener-sysout-example.jar"
|
||||
}]]></programlisting>
|
||||
Or to manually create it start by creating the folder <literal>KEYCLOAK_HOME/modules/org/keycloak/examples/event-sysout/main</literal>.
|
||||
Then copy <literal>event-listener-sysout-example.jar</literal> to this folder and create <literal>module.xml</literal>
|
||||
with the following content:
|
||||
<programlisting><![CDATA[{
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
@ -113,8 +117,10 @@ public class MyEventListenerProvider implements EventListenerProvider {
|
|||
</dependencies>
|
||||
</module>
|
||||
}]]></programlisting>
|
||||
Next you need to register this module with Keycloak. This is done by editing keycloak-server.json and adding
|
||||
it to the providers:
|
||||
</para>
|
||||
<para>
|
||||
Once you've created the module you need to register this module with Keycloak. This is done by editing
|
||||
keycloak-server.json and adding it to the providers:
|
||||
<programlisting><![CDATA[{
|
||||
"providers": [
|
||||
...
|
||||
|
|
Loading…
Reference in a new issue