2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package session;
|
2020-03-31 06:58:22 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/session";
|
2020-02-05 12:14:39 +00:00
|
|
|
option csharp_namespace = "NeoFS.API.Session";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
|
|
|
import "service/meta.proto";
|
|
|
|
import "service/verify.proto";
|
2020-08-05 16:49:16 +00:00
|
|
|
import "refs/types.proto";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
|
|
|
service Session {
|
2020-05-07 15:44:23 +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-05-07 15:44:23 +00:00
|
|
|
// CreateRequest carries an information necessary for opening a session
|
2020-01-30 11:41:24 +00:00
|
|
|
message CreateRequest {
|
2020-08-05 16:49:16 +00:00
|
|
|
// OwnerID carries an identifier of a session initiator.
|
|
|
|
refs.OwnerID OwnerID = 1;
|
2020-05-07 15:44:23 +00:00
|
|
|
|
|
|
|
// Lifetime carries a lifetime of the session
|
2020-08-05 22:37:14 +00:00
|
|
|
service.TokenLifetime Lifetime = 2;
|
2020-05-07 15:44:23 +00:00
|
|
|
|
2020-01-30 11:41:24 +00:00
|
|
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
2020-08-05 22:37:14 +00:00
|
|
|
service.RequestMetaHeader Meta = 98;
|
2020-01-30 11:41:24 +00:00
|
|
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
2020-08-05 22:37:14 +00:00
|
|
|
service.RequestVerificationHeader Verify = 99;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-05-07 15:44:23 +00:00
|
|
|
// CreateResponse carries an information about the opened session
|
2020-01-30 11:41:24 +00:00
|
|
|
message CreateResponse {
|
2020-05-07 15:44:23 +00:00
|
|
|
// ID carries an identifier of session token
|
2020-08-05 22:37:14 +00:00
|
|
|
bytes ID = 1;
|
2020-05-07 15:44:23 +00:00
|
|
|
|
|
|
|
// SessionKey carries a session public key
|
|
|
|
bytes SessionKey = 2;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|