mirror of
https://gitee.com/willfree/min-dev-java.git
synced 2026-06-18 04:50:25 +08:00
VMS注册接口字段有改变:Signature => EncryptedPwd
This commit is contained in:
@@ -22,7 +22,8 @@ public class RegisterWithSignRequest extends BaseStruct {
|
||||
public int IsRevoked;
|
||||
public int UGroupID;
|
||||
public String TimeStamp;
|
||||
public byte[] Signature;
|
||||
// public byte[] Signature;
|
||||
public byte[] EncryptedPwd;
|
||||
|
||||
public RegisterWithSignRequest(int ID, String name, String password, String phone,
|
||||
String invitation, String email, String deviceInfo,
|
||||
@@ -40,6 +41,6 @@ public class RegisterWithSignRequest extends BaseStruct {
|
||||
IsRevoked = isRevoked;
|
||||
this.UGroupID = UGroupID;
|
||||
TimeStamp = timeStamp;
|
||||
Signature = signature;
|
||||
EncryptedPwd = signature;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,11 +32,13 @@ public class TestAPI {
|
||||
// boolean res=bc.Verify(rawText.getBytes(StandardCharsets.UTF_8),base64sig,pubkey);
|
||||
// System.out.println(res);
|
||||
// }
|
||||
// todo: VMS最新版不支持响应验证码,此功能需MIS进行支持。——2022.03.19
|
||||
public static void main(String[] args){
|
||||
String username="comer1";
|
||||
String email="2hsagk3ss@163.com";
|
||||
String username="newBlood2";
|
||||
String email="2hsaosusaisinos@163.com";
|
||||
String phone="15239970973";
|
||||
String passwd="password";
|
||||
// String passwd="password";
|
||||
String passwd="fukinngTestHash";
|
||||
String machineInfo="Android-GuessMe";
|
||||
String smscode = "";
|
||||
int userID=1;
|
||||
@@ -46,7 +48,8 @@ public class TestAPI {
|
||||
String pubkey=bc_keyManager.GetPubkey();
|
||||
byte[] sig;
|
||||
try {
|
||||
sig = bc_keyManager.SignRaw(username.getBytes(StandardCharsets.UTF_8));
|
||||
// sig = bc_keyManager.SignRaw(username.getBytes(StandardCharsets.UTF_8));
|
||||
sig = bc_keyManager.SignRaw(passwd.getBytes(StandardCharsets.UTF_8));
|
||||
} catch (CryptoException e) {
|
||||
e.printStackTrace();
|
||||
return;
|
||||
@@ -78,7 +81,7 @@ public class TestAPI {
|
||||
|
||||
// 构造注册请求包 13294184003
|
||||
if(_regis){
|
||||
RegisterWithSignRequest request=new RegisterWithSignRequest(userID,username,passwd,
|
||||
RegisterWithSignRequest request=new RegisterWithSignRequest(userID,username,"fukinngTestHash",
|
||||
phone,"1234",email,"dev","",
|
||||
pubkey,0,0,"1625142358",sig);
|
||||
try {
|
||||
@@ -103,7 +106,7 @@ public class TestAPI {
|
||||
// 构造登录请求包
|
||||
if(_login){
|
||||
LoginWithSignRequest loginWithSignRequest=new LoginWithSignRequest(username,
|
||||
"password","cert",sig,machineInfo);
|
||||
passwd,"cert",sig,machineInfo);
|
||||
try {
|
||||
System.out.println("login request: "+loginWithSignRequest.toJson());
|
||||
} catch (IllegalAccessException e) {
|
||||
@@ -146,6 +149,7 @@ public class TestAPI {
|
||||
// 获取验证码
|
||||
if(_getsmscode){
|
||||
GetVerificationCode getVerificationCode=new GetVerificationCode(username,"86"+phone);
|
||||
// GetVerificationCode getVerificationCode=new GetVerificationCode(username,phone);
|
||||
try {
|
||||
System.out.println("sms request: "+getVerificationCode.toJson());
|
||||
} catch (IllegalAccessException e) {
|
||||
|
||||
Reference in New Issue
Block a user