mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 16:57:51 +08:00
modify access key
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user