token: update structure

This commit:

  * moves Token message to service package;

  * updates token structure (new verb field, some renaming);

  * replaces VerificationHeader header with Token in object package;

  * removes no longer used VerificationHeader message.
This commit is contained in:
Leonard Lyubich 2020-04-24 19:18:28 +03:00
parent b84fab4d24
commit 6b68940643
8 changed files with 127 additions and 104 deletions

View file

@ -5,7 +5,6 @@ option csharp_namespace = "NeoFS.API.Object";
import "refs/types.proto";
import "object/types.proto";
import "session/types.proto";
import "service/meta.proto";
import "service/verify.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
@ -83,7 +82,7 @@ message PutRequest {
// Object with at least container id and owner id fields
Object Object = 1;
// Token with session public key and user's signature
session.Token Token = 2;
service.Token Token = 2;
// Number of the object copies to store within the RPC call (zero is processed according to the placement rules)
uint32 CopiesNumber = 3;
}
@ -113,7 +112,7 @@ message DeleteRequest {
// OwnerID is a wallet address
bytes OwnerID = 2 [(gogoproto.nullable) = false, (gogoproto.customtype) = "OwnerID"];
// Token with session public key and user's signature
session.Token Token = 3;
service.Token Token = 3;
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)

View file

@ -4,7 +4,7 @@ option go_package = "github.com/nspcc-dev/neofs-api-go/object";
option csharp_namespace = "NeoFS.API.Object";
import "refs/types.proto";
import "session/types.proto";
import "service/verify.proto";
import "storagegroup/types.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
@ -36,8 +36,8 @@ message Header {
Transform Transform = 4;
// Tombstone header that set up in deleted objects
Tombstone Tombstone = 5;
// Verify header that contains session public key and user's signature
session.VerificationHeader Verify = 6;
// Token header contains token of the session within which the object was created
service.Token Token = 6;
// HomoHash is a homomorphic hash of original object payload
bytes HomoHash = 7 [(gogoproto.customtype) = "Hash"];
// PayloadChecksum of actual object's payload