modify access key

This commit is contained in:
afeiszli
2021-05-25 16:09:49 -04:00
parent 78ae219b03
commit b930027a95
16 changed files with 366 additions and 145 deletions

View File

@@ -606,9 +606,10 @@ func CreateAccessKey(accesskey models.AccessKey, network models.Network) (models
}
netID := network.NetID
address := servercfg.GetGRPCHost() + ":" + servercfg.GetGRPCPort()
grpcaddress := servercfg.GetGRPCHost() + ":" + servercfg.GetGRPCPort()
apiaddress := servercfg.GetAPIHost() + ":" + servercfg.GetAPIPort()
accessstringdec := address + "|" + netID + "|" + accesskey.Value + "|" + privAddr
accessstringdec := grpcaddress + "|" + apiaddress + "|" + netID + "|" + accesskey.Value + "|" + privAddr
accesskey.AccessString = base64.StdEncoding.EncodeToString([]byte(accessstringdec))
//validate accesskey
v := validator.New()