From 01ea27a743d52a597700abef8a6ed0b3020f760e Mon Sep 17 00:00:00 2001 From: harture Date: Wed, 1 May 2019 13:07:31 +0200 Subject: [PATCH] Use API extension for User Creation --- users.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users.go b/users.go index 67c8bfb..4940b4e 100644 --- a/users.go +++ b/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. -func (c *Client) CreateUser(accessToken string, realmName string, user UserRepresentation) (string, error) { - return c.post(accessToken, nil, url.Path(userPath), url.Param("realm", realmName), body.JSON(user)) +func (c *Client) CreateUser(accessToken string, reqRealmName, targetRealmName string, user UserRepresentation) (string, error) { + 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.