mirror of
https://github.com/keycloak/keycloak.git
synced 2026-06-08 16:42:13 -04:00
--- Quarkus3 branch sync no. 14 (24.4.2023) Resolved conflicts: keycloak/pom.xml - Modified --- Quarkus3 branch sync no. 5 (10.2.2023) Resolved conflicts: keycloak/pom.xml - Modified |
||
|---|---|---|
| .. | ||
| src/main | ||
| pom.xml | ||
| README.md | ||
Example Realm REST Resource provider
You can deploy as a module by running:
$KEYCLOAK_HOME/bin/jboss-cli.sh --command="module add --name=org.keycloak.examples.hello-rest-example --resources=target/hello-rest-example.jar --dependencies=org.keycloak.keycloak-core,org.keycloak.keycloak-server-spi,org.keycloak.keycloak-server-spi-private,javax.ws.rs.api"
Then registering the provider by editing standalone/configuration/standalone.xml and adding the module to the providers element:
<providers>
...
<provider>module:org.keycloak.examples.hello-rest-example</provider>
</providers>
Then start (or restart) the server. Once started open http://localhost:8080/auth/realms/master/hello and you should see the message Hello master.
You can also invoke the endpoint for other realms by replacing master with the realm name in the above url.