iOS
12. Change Password
You can change your existing password with your new password in Goodie system using this function.
Here is the example code:
1. GoodieCore.changePassword(authToken: "authToken", deviceUniqueId: "deviceUniqueId", passwordOld: "passwordOld", newPassword: "newPassword", confirmPassword: "confirmPassword", memberId: "memberId", merchantId: "merchantId", username: "username", completion: { (ChangePasswordResponse) in 2. if ChangePasswordResponse.abstractResponse?.responseStatus == "MEM902" { 3. //success, do something 4. }else{ 5. //failed 6. } 7. }) { (Error) in 8. //error 9. }
Where :
Param | Type | Description |
---|---|---|
authToken | String | authToken is used as for header authentication purpose |
deviceUniqueId | String | deviceUniqueId is identify android device |
memberId | String | memberId is identifier that will be used to identity a member |
merchantId | String | merchantId is identifier that will be used to identity a merchant |
newPassword | String | Fill this with your new password |
confirmPassword | String | Confirm your new password (it must similar with your newpassword) |
oldPassword | String | Fill with your existing password to make sure that was you |
userName | String | Fill this parameter with your username (email address) |
Response Change Password :
1. { 2. "abstractResponse": { 3. "responseStatus": "MEM902", 4. "responseMessage": "Password has been change" 5. } 6. }