mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-10 15:32:05 -03:30
Fix rest provider example for kc >= 23
Starting with KC23, a @Path is required for an exposed method to work properly Fixes #26088 Signed-off-by: Christophe de Vienne <christophe.devienne@orus.io>
This commit is contained in:
parent
16dddfa49c
commit
1945897c85
@ -21,6 +21,7 @@ import org.keycloak.models.KeycloakSession;
|
||||
import org.keycloak.services.resource.RealmResourceProvider;
|
||||
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.Produces;
|
||||
|
||||
/**
|
||||
@ -39,7 +40,7 @@ public class HelloResourceProvider implements RealmResourceProvider {
|
||||
return this;
|
||||
}
|
||||
|
||||
@GET
|
||||
@GET @Path("")
|
||||
@Produces("text/plain; charset=utf-8")
|
||||
public String get() {
|
||||
String name = session.getContext().getRealm().getDisplayName();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user