session: Tidy up the format

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-06 02:28:57 +03:00 committed by Stanislav Bogatyrev
parent 0ca83fcef6
commit ad5126f53f
2 changed files with 25 additions and 20 deletions

View file

@ -1,5 +1,7 @@
syntax = "proto3";
package session;
option go_package = "github.com/nspcc-dev/neofs-api-go/session";
option csharp_namespace = "NeoFS.API.Session";
@ -8,29 +10,32 @@ import "service/verify.proto";
import "refs/types.proto";
service Session {
// Create opens new session between the client and the server
// Create opens new session between the client and the server.
rpc Create (CreateRequest) returns (CreateResponse);
}
// CreateRequest carries an information necessary for opening a session
// CreateRequest carries an information necessary for opening a session.
message CreateRequest {
// OwnerID carries an identifier of a session initiator.
// Carries an identifier of a session initiator.
refs.OwnerID OwnerID = 1;
// Lifetime carries a lifetime of the session
// Carries a lifetime of the session.
service.TokenLifetime Lifetime = 2;
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
service.RequestMetaHeader Meta = 98;
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
service.RequestVerificationHeader Verify = 99;
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
service.RequestMetaHeader MetaHeader = 98;
// Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader VerifyHeader = 99;
}
// CreateResponse carries an information about the opened session
// CreateResponse carries an information about the opened session.
message CreateResponse {
// ID carries an identifier of session token
// ID carries an identifier of session token.
bytes ID = 1;
// SessionKey carries a session public key
// SessionKey carries a session public key.
bytes SessionKey = 2;
}