2025-09-09 17:54:16 +08:00
|
|
|
package passport
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ChangePasswordRequest struct {
|
|
|
|
*requests.RpcRequest
|
|
|
|
}
|
|
|
|
|
|
|
|
func CreateChangePasswordRequest(userName string, newPwd string) (req *ChangePasswordRequest) {
|
|
|
|
ts, sign := GetSign()
|
|
|
|
|
|
|
|
req = &ChangePasswordRequest{
|
|
|
|
RpcRequest: &requests.RpcRequest{},
|
|
|
|
}
|
|
|
|
req.InitWithApiInfo(HOST, VERSION, "/remote_login.php")
|
|
|
|
req.FormParams = map[string]string{
|
|
|
|
"act": "getpwd",
|
|
|
|
"do": "passwd",
|
|
|
|
"username": userName,
|
|
|
|
"newpwd": newPwd,
|
|
|
|
"time": fmt.Sprintf("%v", ts),
|
|
|
|
"sign": sign,
|
2025-09-11 18:09:29 +08:00
|
|
|
"format": "json",
|
2025-09-09 17:54:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
req.Method = requests.POST
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func CreateChangePasswordResponse() (response *ChangePasswordResponse) {
|
|
|
|
response = &ChangePasswordResponse{
|
|
|
|
BaseResponse: &responses.BaseResponse{},
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
type ChangePasswordResponse struct {
|
|
|
|
*responses.BaseResponse
|
|
|
|
}
|