Skip to content

Commit

Permalink
[CLOUDTRUST-2022] create shadow user
Browse files Browse the repository at this point in the history
  • Loading branch information
bsoniam committed Jan 28, 2020
1 parent 1a31485 commit 837b7c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions users.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const (
sendReminderEmailPath = "/auth/realms/:realm/onboarding/sendReminderEmail"
smsAPI = "/auth/realms/:realm/smsApi"
sendNewEnrolmentCode = smsAPI + "/sendNewCode"
shadowUser = userIDPath + "/federated-identity/:provider"
)

// GetUsers returns a list of users, filtered according to the query parameters.
Expand Down Expand Up @@ -105,3 +106,9 @@ func (c *Client) SendReminderEmail(accessToken string, realmName string, userID
_, err := c.post(accessToken, nil, plugins...)
return err
}

// CreateShadowUser creates the a shadow user in the context of brokering
func (c *Client) CreateShadowUser(accessToken string, reqRealmName string, userID string, provider string, fedIDKC FederatedIdentityRepresentation) error {
_, err := c.post(accessToken, nil, url.Path(shadowUser), url.Param("realm", reqRealmName), url.Param("id", userID), url.Param("provider", provider), body.JSON(fedIDKC))
return err
}

0 comments on commit 837b7c8

Please sign in to comment.