Browse Source

Use API extension for User Creation

master
harture 7 years ago
parent
commit
01ea27a743
  1. 4
      users.go

4
users.go

@ -39,8 +39,8 @@ func (c *Client) GetUsers(accessToken string, reqRealmName, targetRealmName stri
} }
// CreateUser creates the user from its UserRepresentation. The username must be unique. // CreateUser creates the user from its UserRepresentation. The username must be unique.
func (c *Client) CreateUser(accessToken string, realmName string, user UserRepresentation) (string, error) { func (c *Client) CreateUser(accessToken string, reqRealmName, targetRealmName string, user UserRepresentation) (string, error) {
return c.post(accessToken, nil, url.Path(userPath), url.Param("realm", realmName), body.JSON(user)) return c.post(accessToken, nil, url.Path(usersAdminExtensionApiPath), url.Param("realmReq", reqRealmName), url.Param("realm", targetRealmName), body.JSON(user))
} }
// CountUsers returns the number of users in the realm. // CountUsers returns the number of users in the realm.

Loading…
Cancel
Save