apps添加私钥
This commit is contained in:
1 parent
051f78b59c
commit
35c7bcc8aa
10 files changed
+152
-79
No files matched your search
@@ -3,6 +3,7 @@ package com.ruoyi.system.domain;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
@@ -64,6 +65,10 @@ public class Apps extends BaseEntity
|
||||
@Excel(name = "公钥")
|
||||
private String publicKey;
|
||||
|
||||
/** 加密后的私钥,禁止序列化到接口响应 */
|
||||
@JsonIgnore
|
||||
private String privateKey;
|
||||
|
||||
/** 信用额度 */
|
||||
@Excel(name = "信用额度金额")
|
||||
private BigDecimal creditLimit;
|
||||
@@ -187,6 +192,15 @@ public class Apps extends BaseEntity
|
||||
{
|
||||
return publicKey;
|
||||
}
|
||||
public void setPrivateKey(String privateKey)
|
||||
{
|
||||
this.privateKey = privateKey;
|
||||
}
|
||||
|
||||
public String getPrivateKey()
|
||||
{
|
||||
return privateKey;
|
||||
}
|
||||
public void setCreditLimit(BigDecimal creditLimit)
|
||||
{
|
||||
this.creditLimit = creditLimit;
|
||||
@@ -256,6 +270,7 @@ public class Apps extends BaseEntity
|
||||
.append("trxBalance", getTrxBalance())
|
||||
.append("usdtBalance", getUsdtBalance())
|
||||
.append("publicKey", getPublicKey())
|
||||
.append("privateKey", "<redacted>")
|
||||
.append("creditLimit", getCreditLimit())
|
||||
.append("googleSub", getGoogleSub())
|
||||
.append("googleEmail", getGoogleEmail())
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ruoyi.system.domain;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
@@ -56,6 +57,9 @@ public class AppsPlus implements Serializable
|
||||
/** 公钥 */
|
||||
@Excel(name = "公钥")
|
||||
private String publicKey;
|
||||
/** 加密后的私钥,禁止序列化到接口响应 */
|
||||
@JsonIgnore
|
||||
private String privateKey;
|
||||
/** 信用额度 */
|
||||
@Excel(name = "信用额度金额")
|
||||
private BigDecimal creditLimit;
|
||||
@@ -173,6 +177,15 @@ public class AppsPlus implements Serializable
|
||||
{
|
||||
return publicKey;
|
||||
}
|
||||
public void setPrivateKey(String privateKey)
|
||||
{
|
||||
this.privateKey = privateKey;
|
||||
}
|
||||
|
||||
public String getPrivateKey()
|
||||
{
|
||||
return privateKey;
|
||||
}
|
||||
public void setCreditLimit(BigDecimal creditLimit)
|
||||
{
|
||||
this.creditLimit = creditLimit;
|
||||
@@ -242,6 +255,7 @@ public class AppsPlus implements Serializable
|
||||
.append("trxBalance", getTrxBalance())
|
||||
.append("usdtBalance", getUsdtBalance())
|
||||
.append("publicKey", getPublicKey())
|
||||
.append("privateKey", "<redacted>")
|
||||
.append("creditLimit", getCreditLimit())
|
||||
.append("googleSub", getGoogleSub())
|
||||
.append("googleEmail", getGoogleEmail())
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.ruoyi.system.domain.vo;
|
||||
|
||||
/**
|
||||
* RSA 密钥对生成结果,公钥为 X.509 PEM,私钥为 PKCS#8 PEM。
|
||||
* privateKey 只在生成接口本次响应中出现,服务端绝不持久化。
|
||||
* 仅供服务层内部传递。privateKey 写入数据库前必须加密,禁止放入 HTTP 响应。
|
||||
*/
|
||||
public class AppKeyPairResult {
|
||||
private final String algorithm;
|
||||
|
||||
Reference in new issue
Block a user