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

Fix bug

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