Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3430,6 +3430,17 @@ func (g *GoCloak) ImportResourceServer(ctx context.Context, token, realm, idOfCl
return checkForError(resp, err, errMessage)
}

// UpdateResourceServer updates the configuration of a resource server
func (g *GoCloak) UpdateResourceServer(ctx context.Context, token, realm, idOfClient string, resourceServer ResourceServerRepresentation) error {
const errMessage = "could not update resource server"

resp, err := g.GetRequestWithBearerAuth(ctx, token).
SetBody(resourceServer).
Put(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server"))

return checkForError(resp, err, errMessage)
}

// UpdateResource updates a resource associated with the client, using access token from admin
func (g *GoCloak) UpdateResource(ctx context.Context, token, realm, idOfClient string, resource ResourceRepresentation) error {
const errMessage = "could not update resource"
Expand Down
Loading