|
@@ -3,6 +3,7 @@ package com.qmth.boot.core.solar.model;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import com.qmth.boot.core.solar.enums.OrgType;
|
|
import com.qmth.boot.core.solar.enums.OrgType;
|
|
import com.qmth.boot.tools.codec.CodecUtils;
|
|
import com.qmth.boot.tools.codec.CodecUtils;
|
|
|
|
+import com.qmth.boot.tools.models.ByteArray;
|
|
|
|
|
|
import java.io.Serializable;
|
|
import java.io.Serializable;
|
|
|
|
|
|
@@ -110,4 +111,24 @@ public class OrgInfo implements Serializable {
|
|
public void setAccessSecret(String accessSecret) {
|
|
public void setAccessSecret(String accessSecret) {
|
|
this.accessSecret = accessSecret;
|
|
this.accessSecret = accessSecret;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 返回第三方接口访问鉴权使用的key
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @JsonIgnore
|
|
|
|
+ public String getThirdPartyKey() {
|
|
|
|
+ return code;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 返回第三方接口访问鉴权使用的secret
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @JsonIgnore
|
|
|
|
+ public String getThirdPartySecret() {
|
|
|
|
+ return ByteArray.hmacsha256(accessKey, accessSecret).toHexString().toLowerCase();
|
|
|
|
+ }
|
|
}
|
|
}
|