新增apiKey和相关逻辑
This commit is contained in:
1 parent
bc772b8b15
commit
051f78b59c
9 files changed
+77
-15
No files matched your search
@@ -29,6 +29,10 @@ public class AppApiKeys extends BaseEntity
|
||||
@Excel(name = "用户")
|
||||
private Long userId;
|
||||
|
||||
/** API 公钥标识 */
|
||||
@Excel(name = "API Key")
|
||||
private String apiKey;
|
||||
|
||||
/** 密钥 */
|
||||
@JsonIgnore
|
||||
private String apiSecret;
|
||||
@@ -82,6 +86,15 @@ public class AppApiKeys extends BaseEntity
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setApiKey(String apiKey)
|
||||
{
|
||||
this.apiKey = apiKey;
|
||||
}
|
||||
|
||||
public String getApiKey()
|
||||
{
|
||||
return apiKey;
|
||||
}
|
||||
public void setApiSecret(String apiSecret)
|
||||
{
|
||||
this.apiSecret = apiSecret;
|
||||
@@ -143,6 +156,7 @@ public class AppApiKeys extends BaseEntity
|
||||
.append("id", getId())
|
||||
.append("appId", getAppId())
|
||||
.append("userId", getUserId())
|
||||
.append("apiKey", getApiKey())
|
||||
.append("apiSecret", "<redacted>")
|
||||
.append("status", getStatus())
|
||||
.append("expiredAt", getExpiredAt())
|
||||
|
||||
@@ -33,6 +33,9 @@ public class AppApiKeysPlus implements Serializable
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
private Long userId;
|
||||
/** API 公钥标识 */
|
||||
@Excel(name = "API Key")
|
||||
private String apiKey;
|
||||
/** 密钥 */
|
||||
@JsonIgnore
|
||||
private String apiSecret;
|
||||
@@ -80,6 +83,15 @@ public class AppApiKeysPlus implements Serializable
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setApiKey(String apiKey)
|
||||
{
|
||||
this.apiKey = apiKey;
|
||||
}
|
||||
|
||||
public String getApiKey()
|
||||
{
|
||||
return apiKey;
|
||||
}
|
||||
public void setApiSecret(String apiSecret)
|
||||
{
|
||||
this.apiSecret = apiSecret;
|
||||
@@ -141,6 +153,7 @@ public class AppApiKeysPlus implements Serializable
|
||||
.append("id", getId())
|
||||
.append("appId", getAppId())
|
||||
.append("userId", getUserId())
|
||||
.append("apiKey", getApiKey())
|
||||
.append("apiSecret", "<redacted>")
|
||||
.append("status", getStatus())
|
||||
.append("expiredAt", getExpiredAt())
|
||||
|
||||
@@ -5,13 +5,16 @@ public class AppApiKeyCreateResult {
|
||||
private final Long id;
|
||||
private final Long appId;
|
||||
private final String apiSecret;
|
||||
private final String apiKey;
|
||||
|
||||
public AppApiKeyCreateResult(Long id, Long appId, String apiSecret) {
|
||||
public AppApiKeyCreateResult(Long id, Long appId, String apiKey, String apiSecret) {
|
||||
this.id = id;
|
||||
this.appId = appId;
|
||||
this.apiSecret = apiSecret;
|
||||
this.apiKey = apiKey;
|
||||
}
|
||||
public Long getId() { return id; }
|
||||
public Long getAppId() { return appId; }
|
||||
public String getApiSecret() { return apiSecret; }
|
||||
public String getApiKey() { return apiKey; }
|
||||
}
|
||||
Reference in new issue
Block a user