frostfs-api/session/service.proto

61 lines
1.8 KiB
Protocol Buffer
Raw Normal View History

2020-01-30 11:41:24 +00:00
syntax = "proto3";
2020-01-30 11:41:24 +00:00
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 "refs/types.proto";
2020-01-30 11:41:24 +00:00
import "service/meta.proto";
import "service/verify.proto";
service Session {
// Create opens new session between the client and the server.
rpc Create (CreateRequest) returns (CreateResponse);
2020-01-30 11:41:24 +00:00
}
// CreateRequest carries an information necessary for opening a session.
2020-01-30 11:41:24 +00:00
message CreateRequest {
message Body {
// Carries an identifier of a session initiator.
refs.OwnerID owner_id = 1;
// Carries a lifetime of the session.
service.TokenLifetime lifetime = 2;
}
// 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.
service.RequestMetaHeader meta_header = 2;
// Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader verify_header = 3;
2020-01-30 11:41:24 +00:00
}
// CreateResponse carries an information about the opened session.
2020-01-30 11:41:24 +00:00
message CreateResponse {
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.
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;
2020-01-30 11:41:24 +00:00
}