POST api/Agent/ChangeLoginPassword/UseVerifyCode
使用验证码重置登陆密码。 认证方式:HAWK,密钥:KEY(注意 ,这个是与其他方法稍有不同的)。
请求信息
URI参数
None.
窗体参数
重置密码的参数。
NewPasswordWithVerifyCodeParm| Name | Description | Type | Additional information |
|---|---|---|---|
| newpassword |
新密码,非明文。 按以下规则进行加密: 重置登陆密码时: KEY=会话密钥(STRING) byte[] KEYForTripDes = HAMCSHA256(UTF8.GetBytes(KEY)) byte[] KEY2 = KEYFroTripDes的前24字节 值= ToBase64String(TripleDes(UTF8.GetBytes(UPPER_MD5(新密码)),KEY2) 设置支付密码时: KEY=会话密钥(STRING) + UPPER_MD5(登陆密码) byte[] KEYForTripDes = HAMCSHA256(UTF8.GetBytes(KEY)) byte[] KEY2 = KEYFroTripDes的前24字节 值= ToBase64String(TripleDes(UTF8.GetBytes(UPPER_MD5(新密码)),KEY2) 对UPPER_MD5()计算过程的描述: byte[] valueBuffer = Utf8.GetBytes(待运算的字符串) byte[] md5buffer = Md5(valueBuffer); string value = FormatString(md5Buffer,"x2")/*这个的意思是转换成bcd字符串,一个字节变成两个字符0xae= "ae",0x0a="0a"*/ string returnvalue = upper(value);全部转换成大写,仍然是每两个字符表示一个字节。 请不要指责这个脱库子放屁的处理,因为我们要兼容老版本,新版本只能如此。 |
string |
Required Max length: 64 |
| verifycode |
验证码 |
string |
Required Max length: 6 |
| mobile |
手机号尾数或全号,此手机号必须是开立电子门票系统账户时,留存于供应商处的手机1或手机2的尾数。 |
string |
Required Max length: 11 |
| username |
用户登陆名 |
string |
Required Max length: 30 |
请求格式
Test application/json, text/json
{
"newpassword": "sample string 1",
"verifycode": "sample string 2",
"mobile": "sample string 3",
"username": "sample string 4"
}
Test application/xml, text/xml
<NewPasswordWithVerifyCodeParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TourWebApi.Models.Param"> <mobile>sample string 3</mobile> <newpassword>sample string 1</newpassword> <username>sample string 4</username> <verifycode>sample string 2</verifycode> </NewPasswordWithVerifyCodeParm>
Test application/x-www-form-urlencoded
没有示例。
回复信息
资源描述
使用验证码重置登陆密码。 认证方式:HAWK,密钥:KEY(注意 ,这个是与其他方法稍有不同的)。
IHttpActionResultNone.
回复格式
Test application/json, text/json, application/xml, text/xml
没有示例。