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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue