You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The PUT /admin/realms/{realm} endpoint in the Keycloak API has a path parameter with the realm name and the request body with the RealmRepresentation. The gocloak library use it wrongly, because in the UpdateRealm method only the RealmRepresentation passed and the realm name from there is used as the path parameter. In case that is changed the updated fails.
Based on the Keycloak API the name of the original realm should be passed as the path parameter.
To Reproduce
Call gocloak.UpdateRealm method with a changed realm name.
Expected behavior
The realm name in Keycloak is updated.
Temporary I could fix it like this:
`// UpdateRealm updates a given realm
func (g *GoCloak) UpdateRealm(ctx context.Context, token string, realm RealmRepresentation, realmToUpdate string) error {
const errMessage = "could not update realm"
Describe the bug
The PUT /admin/realms/{realm} endpoint in the Keycloak API has a path parameter with the realm name and the request body with the RealmRepresentation. The gocloak library use it wrongly, because in the UpdateRealm method only the RealmRepresentation passed and the realm name from there is used as the path parameter. In case that is changed the updated fails.
Based on the Keycloak API the name of the original realm should be passed as the path parameter.
To Reproduce
Call gocloak.UpdateRealm method with a changed realm name.
Expected behavior
The realm name in Keycloak is updated.
Temporary I could fix it like this:
`// UpdateRealm updates a given realm
func (g *GoCloak) UpdateRealm(ctx context.Context, token string, realm RealmRepresentation, realmToUpdate string) error {
const errMessage = "could not update realm"
}`
The text was updated successfully, but these errors were encountered: