Skip to content
Snippets Groups Projects
Commit 5dcfba9e authored by Gospodin Bodurov's avatar Gospodin Bodurov
Browse files

Fix bug

parent 571d172f
No related branches found
No related tags found
1 merge request!44Login with vereign
......@@ -27,6 +27,7 @@ import (
"code.vereign.com/code/viam-apis/versions"
"github.com/golang/protobuf/proto"
"code.vereign.com/code/key-storage-agent/config"
keyutils "code.vereign.com/code/key-storage-agent/utils"
"code.vereign.com/code/viam-apis/authentication"
"code.vereign.com/code/viam-apis/key-storage-agent/api"
......@@ -228,12 +229,15 @@ func (s *KeyStorageServerImpl) ReserveKeyUUID(ctx context.Context, in *api.Reser
}
func (s *KeyStorageServerImpl) GetKeyId(ctx context.Context, in *api.GetKeyIdByKeyRequest) (*api.GetKeyIdByKeyResponse, error) {
auth := s.CreateAuthentication(ctx)
//in.PublicKey
entitiesMagamentClient := keyutils.CreateEntitiesManagementClient(auth)
viamAuth := &authentication.Authentication{
Uuid: config.SystemAuth.Uuid,
Session: config.SystemAuth.Session,
}
entitiesMagamentClient := keyutils.CreateEntitiesManagementClient(viamAuth)
defer entitiesMagamentClient.CloseClient()
dataStorageClient := keyutils.CreateDataStorageClient(auth)
dataStorageClient := keyutils.CreateDataStorageClient(viamAuth)
defer dataStorageClient.CloseClient()
keyIdResponse := &api.GetKeyIdByKeyResponse{}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment