Browse Source
EDL-28-update-client
Co-authored-by: Lorenceau Pablo <pablo.lorenceau@elca.ch>
master
pablo-lo
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
0 deletions
-
api/clients.go
|
|
@ -4,6 +4,7 @@ import ( |
|
|
"errors" |
|
|
"errors" |
|
|
|
|
|
|
|
|
"github.com/cloudtrust/keycloak-client" |
|
|
"github.com/cloudtrust/keycloak-client" |
|
|
|
|
|
"gopkg.in/h2non/gentleman.v2/plugins/body" |
|
|
"gopkg.in/h2non/gentleman.v2/plugins/url" |
|
|
"gopkg.in/h2non/gentleman.v2/plugins/url" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
@ -35,6 +36,11 @@ func (c *Client) GetClient(accessToken string, realmName, idClient string) (keyc |
|
|
return resp, err |
|
|
return resp, err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// UpdateClient updates the client. idClient is the id of client (not client-id).
|
|
|
|
|
|
func (c *Client) UpdateClient(accessToken string, realmName, idClient string, clientRep keycloak.ClientRepresentation) error { |
|
|
|
|
|
return c.put(accessToken, url.Path(clientIDPath), url.Param("realm", realmName), url.Param("id", idClient), body.JSON(clientRep)) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// GetClientMappers gets mappers of the client specified by id
|
|
|
// GetClientMappers gets mappers of the client specified by id
|
|
|
func (c *Client) GetClientMappers(accessToke string, realmName, idClient string) ([]keycloak.ClientMapperRepresentation, error) { |
|
|
func (c *Client) GetClientMappers(accessToke string, realmName, idClient string) ([]keycloak.ClientMapperRepresentation, error) { |
|
|
var resp = []keycloak.ClientMapperRepresentation{} |
|
|
var resp = []keycloak.ClientMapperRepresentation{} |
|
|
|