Browse Source

Rename SendNewEnrolmentCode to SendSmsCode

master
harture 5 years ago
committed by GitHub
parent
commit
7d2b9005dd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      api/users.go

8
api/users.go

@ -18,7 +18,7 @@ const (
executeActionsEmailPath = userIDPath + "/execute-actions-email" executeActionsEmailPath = userIDPath + "/execute-actions-email"
sendReminderEmailPath = "/auth/realms/:realm/onboarding/sendReminderEmail" sendReminderEmailPath = "/auth/realms/:realm/onboarding/sendReminderEmail"
smsAPI = "/auth/realms/:realm/smsApi" smsAPI = "/auth/realms/:realm/smsApi"
sendNewEnrolmentCode = smsAPI + "/sendNewCode" sendSmsCode = smsAPI + "/sendNewCode"
shadowUser = userIDPath + "/federated-identity/:provider" shadowUser = userIDPath + "/federated-identity/:provider"
) )
@ -94,11 +94,11 @@ func (c *Client) ExecuteActionsEmail(accessToken string, realmName string, userI
return c.put(accessToken, plugins...) return c.put(accessToken, plugins...)
} }
// SendNewEnrolmentCode sends a new enrolment code and return it // SendSmsCode sends a SMS code and return it
func (c *Client) SendNewEnrolmentCode(accessToken string, realmName string, userID string) (keycloak.SmsCodeRepresentation, error) { func (c *Client) SendSmsCode(accessToken string, realmName string, userID string) (keycloak.SmsCodeRepresentation, error) {
var paramKV []string var paramKV []string
paramKV = append(paramKV, "userid", userID) paramKV = append(paramKV, "userid", userID)
var plugins = append(createQueryPlugins(paramKV...), url.Path(sendNewEnrolmentCode), url.Param("realm", realmName)) var plugins = append(createQueryPlugins(paramKV...), url.Path(sendSmsCode), url.Param("realm", realmName))
var resp = keycloak.SmsCodeRepresentation{} var resp = keycloak.SmsCodeRepresentation{}
_, err := c.post(accessToken, &resp, plugins...) _, err := c.post(accessToken, &resp, plugins...)

Loading…
Cancel
Save