forked from TrueCloudLab/frostfs-api
[#37] Add body message to session token requests
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
60690a0f0b
commit
66c58e45e8
1 changed files with 32 additions and 13 deletions
|
@ -5,9 +5,9 @@ package session;
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/session";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/session";
|
||||||
option csharp_namespace = "NeoFS.API.Session";
|
option csharp_namespace = "NeoFS.API.Session";
|
||||||
|
|
||||||
|
import "refs/types.proto";
|
||||||
import "service/meta.proto";
|
import "service/meta.proto";
|
||||||
import "service/verify.proto";
|
import "service/verify.proto";
|
||||||
import "refs/types.proto";
|
|
||||||
|
|
||||||
service Session {
|
service Session {
|
||||||
// Create opens new session between the client and the server.
|
// Create opens new session between the client and the server.
|
||||||
|
@ -16,26 +16,45 @@ service Session {
|
||||||
|
|
||||||
// CreateRequest carries an information necessary for opening a session.
|
// CreateRequest carries an information necessary for opening a session.
|
||||||
message CreateRequest {
|
message CreateRequest {
|
||||||
|
message Body {
|
||||||
// Carries an identifier of a session initiator.
|
// Carries an identifier of a session initiator.
|
||||||
refs.OwnerID owner_id = 1;
|
refs.OwnerID owner_id = 1;
|
||||||
|
|
||||||
// Carries a lifetime of the session.
|
// Carries a lifetime of the session.
|
||||||
service.TokenLifetime lifetime = 2;
|
service.TokenLifetime lifetime = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// Carries request meta information. Header data is used only to regulate
|
// Body of create session token request message.
|
||||||
// message transport and does not affect request execution.
|
Body body = 1;
|
||||||
service.RequestMetaHeader meta_header = 98;
|
|
||||||
|
// Carries request meta information. Header data is used only to regulate message
|
||||||
|
// transport and does not affect request execution.
|
||||||
|
service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries request verification information. This header is used to authenticate
|
// Carries request verification information. This header is used to authenticate
|
||||||
// the nodes of the message route and check the correctness of transmission.
|
// the nodes of the message route and check the correctness of transmission.
|
||||||
service.RequestVerificationHeader verify_header = 99;
|
service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateResponse carries an information about the opened session.
|
// CreateResponse carries an information about the opened session.
|
||||||
message CreateResponse {
|
message CreateResponse {
|
||||||
|
message Body {
|
||||||
// id carries an identifier of session token.
|
// id carries an identifier of session token.
|
||||||
bytes id = 1;
|
bytes id = 1;
|
||||||
|
|
||||||
// session_key carries a session public key.
|
// session_key carries a session public key.
|
||||||
bytes session_key = 2;
|
bytes session_key = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Body of create session token response message.
|
||||||
|
Body body = 1;
|
||||||
|
|
||||||
|
// Carries response meta information. Header data is used only to regulate
|
||||||
|
// message transport and does not affect request execution.
|
||||||
|
service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries response verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue