POST api/WebInterface/Personal/ChangePassword

使用旧密码更改个人用户密码。V4.0接口,没有向下兼容接口,HAWK认证,仅限官方网络,代理商不可访问。

Request Information

URI Parameters

None.

Body Parameters

更改密码时使用的参数。

NewPersonalPasswordParm
NameDescriptionTypeAdditional information
newpassword

新密码,非明文。 按以下规则进行加密: KEY=会话密钥(STRING)+UPPER_MD5(登陆密码) //官方代理商的KEY和密码 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

oldPassword

旧密码,非明文。 按以下规则进行加密: KEY=会话密钥(STRING)+UPPER_MD5(登陆密码) //官方代理商的KEY和密码 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

personalid

个人用户的会员ID

integer

Required

Request Formats

application/json, text/json

Sample:
{
  "newpassword": "sample string 1",
  "oldPassword": "sample string 2",
  "personalid": 3
}

application/xml, text/xml

Sample:
<NewPersonalPasswordParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Parm.WebInterface">
  <newpassword>sample string 1</newpassword>
  <oldPassword>sample string 2</oldPassword>
  <personalid>3</personalid>
</NewPersonalPasswordParm>

application/x-www-form-urlencoded

Sample:

Sample not available.

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.

Response Information

Resource Description

使用旧密码更改个人用户密码。V4.0接口,没有向下兼容接口,HAWK认证,仅限官方网络,代理商不可访问。

CommonOperationResult
NameDescriptionTypeAdditional information
errcode

错误代码,通常0表示成功,其他值表示错误。

integer

None.

errmsg

错误描述,当errcode不为零时,此值可以用于呈现给用户。

string

None.

tag

操作同时,服务器端需要返回的其他值。

string

None.

Response Formats

application/json, text/json

Sample:
{
  "errcode": 1,
  "errmsg": "sample string 2",
  "tag": "sample string 3"
}

application/xml, text/xml

Sample:
<CommonOperationResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer">
  <errcode>1</errcode>
  <errmsg>sample string 2</errmsg>
  <tag>sample string 3</tag>
</CommonOperationResult>

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.