2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
2020-08-05 23:28:57 +00:00
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
package neo.fs.v2.session;
|
2020-08-05 23:28:57 +00:00
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/session;session";
|
|
|
|
option csharp_namespace = "NeoFS.API.v2.Session";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-08-11 09:02:10 +00:00
|
|
|
import "refs/types.proto";
|
2020-01-30 11:41:24 +00:00
|
|
|
import "service/meta.proto";
|
|
|
|
import "service/verify.proto";
|
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Create Session record on Node side
|
|
|
|
service SessionService {
|
2020-08-11 09:03:50 +00:00
|
|
|
// Create opens new session between the client and the server.
|
|
|
|
rpc Create (CreateRequest) returns (CreateResponse);
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-05 23:28:57 +00:00
|
|
|
// CreateRequest carries an information necessary for opening a session.
|
2020-01-30 11:41:24 +00:00
|
|
|
message CreateRequest {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Request body
|
2020-08-11 09:02:10 +00:00
|
|
|
message Body {
|
|
|
|
// Carries an identifier of a session initiator.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.OwnerID owner_id = 1;
|
2020-05-07 15:44:23 +00:00
|
|
|
|
2020-08-11 09:02:10 +00:00
|
|
|
// Carries a lifetime of the session.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.TokenLifetime lifetime = 2;
|
2020-08-11 09:02:10 +00:00
|
|
|
}
|
|
|
|
// Body of create session token request message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries request meta information. Header data is used only to regulate message
|
|
|
|
// transport and does not affect request execution.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
2020-08-05 23:28:57 +00:00
|
|
|
|
2020-08-11 09:03:50 +00:00
|
|
|
// Carries request verification information. This header is used to authenticate
|
|
|
|
// the nodes of the message route and check the correctness of transmission.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-05 23:28:57 +00:00
|
|
|
// CreateResponse carries an information about the opened session.
|
2020-01-30 11:41:24 +00:00
|
|
|
message CreateResponse {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Response body
|
2020-08-11 09:02:10 +00:00
|
|
|
message Body {
|
|
|
|
// id carries an identifier of session token.
|
|
|
|
bytes id = 1;
|
|
|
|
|
|
|
|
// session_key carries a session public key.
|
|
|
|
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.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
2020-05-07 15:44:23 +00:00
|
|
|
|
2020-08-11 09:02:10 +00:00
|
|
|
// Carries response verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness
|
|
|
|
// of transmission.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|