-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from WeBankFinTech/feature/weid-auth
Feature/add weid auth module
- Loading branch information
Showing
19 changed files
with
1,081 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/com/webank/weid/protocol/amop/GetWeIdAuthArgs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.webank.weid.protocol.amop; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import com.webank.weid.protocol.amop.base.AmopBaseMsgArgs; | ||
import com.webank.weid.protocol.base.Challenge; | ||
|
||
/** | ||
* args for getting weIdAuth object. | ||
* @author tonychen 2020年3月10日 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class GetWeIdAuthArgs extends AmopBaseMsgArgs { | ||
|
||
/** | ||
* self weId. | ||
*/ | ||
private String weId; | ||
|
||
/** | ||
* the challenge. | ||
*/ | ||
private Challenge challenge; | ||
|
||
/** | ||
* 0:single, 1:mutual. | ||
*/ | ||
private Integer type; | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/com/webank/weid/protocol/amop/RequestVerifyChallengeArgs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.webank.weid.protocol.amop; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import com.webank.weid.protocol.amop.base.AmopBaseMsgArgs; | ||
import com.webank.weid.protocol.base.Challenge; | ||
|
||
/** | ||
* args for verify challenge. | ||
* @author tonychen 2020年3月12日 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class RequestVerifyChallengeArgs extends AmopBaseMsgArgs { | ||
|
||
private String channelId; | ||
private String selfWeId; | ||
private Challenge challenge; | ||
private String signData; | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/com/webank/weid/protocol/response/GetWeIdAuthResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.webank.weid.protocol.response; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* get weIdAuth response. | ||
* @author tonychen 2020年3月10日 | ||
* | ||
*/ | ||
@Getter | ||
@Setter | ||
public class GetWeIdAuthResponse { | ||
|
||
/** | ||
* encrypt data, including challenge sign, weIdAuthObj. | ||
*/ | ||
private byte[] data; | ||
|
||
/** | ||
* error code. | ||
*/ | ||
private Integer errorCode; | ||
|
||
/** | ||
* error message. | ||
*/ | ||
protected String errorMessage; | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/com/webank/weid/protocol/response/RequestVerifyChallengeResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.webank.weid.protocol.response; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* response for verifying challenge signature. | ||
* @author tonychen 2020年3月12日 | ||
* | ||
*/ | ||
@Setter | ||
@Getter | ||
public class RequestVerifyChallengeResponse { | ||
|
||
/** | ||
* error code. | ||
*/ | ||
private Integer errorCode; | ||
|
||
/** | ||
* error message. | ||
*/ | ||
protected String errorMessage; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.