Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetServerInfo use wrong URL #417

Open
roiebe opened this issue Apr 13, 2023 · 0 comments
Open

GetServerInfo use wrong URL #417

roiebe opened this issue Apr 13, 2023 · 0 comments

Comments

@roiebe
Copy link

roiebe commented Apr 13, 2023

Describe the bug
GetServerInfo use wrong URL to request the server info from the keycloak server.
the URL <base-path>/admin/realms should be replaced with <base-path>/admin/serverinfo.
this mistake exists in the keycloak documentation too, and that may be the reason for the wrong implementation.

To Reproduce
Steps to reproduce the behavior:

  1. run keycloak version 20.0.3
  2. create a client (*gocloak.GoCloak)
  3. run client.LoginAdmin to get a token
  4. run client.GetServerInfo(ctx, token.AccessToken)

Expected behavior
the return value should contains server information, like the keycloak version, but it contains just default values.
the return value should be a single ServerInfoRepresentation, but it is a slice of ServerInfoRepresentation.
keycloak documentation refer to the wrong URL path, but they also describe that only a single ServerInfoRepresentation should be return. see https://www.keycloak.org/docs-api/20.0.3/rest-api/index.html#_root_resource

Desktop

  • OS: windows 11
  • Keyclaok Version: 20.0.3
  • goclaok version: 13.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant