2025-09-29 07:44:53 +09:00
|
|
|
syntax = "proto3";
|
2025-09-30 08:07:17 +09:00
|
|
|
package caretta_sync.authorization_request;
|
2025-09-29 07:44:53 +09:00
|
|
|
|
|
|
|
|
import "caretta_sync.common.proto";
|
2025-09-30 08:07:17 +09:00
|
|
|
import "caretta_sync.authorized_node.proto";
|
|
|
|
|
import "caretta_sync.remote_node.proto";
|
2025-09-29 07:44:53 +09:00
|
|
|
import "tripod_id.proto";
|
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
|
import "google/protobuf/duration.proto";
|
|
|
|
|
|
|
|
|
|
service AuthorizationRequest {
|
|
|
|
|
rpc Send(AuthorizationRequestSendRequest) returns (AuthorizationRequestSendResponse);
|
|
|
|
|
rpc Accept(AuthorizationRequestAcceptRequest) returns (AuthorizationRequestAcceptResponse);
|
|
|
|
|
rpc Reject(AuthorizationRequestRejectRequest) returns (AuthorizationRequestRejectResponse);
|
|
|
|
|
rpc Info(AuthorizationRequestInfoRequest) returns (AuthorizationRequestInfoResponse);
|
|
|
|
|
rpc InfoStream(stream AuthorizationRequestInfoStreamRequest) returns (stream AuthorizationRequestInfoStreamResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
enum AuthorizationRequestKind {
|
|
|
|
|
SENT = 0;
|
|
|
|
|
RECEIVED = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message AuthorizationRequestSendRequest {
|
2025-09-30 08:07:17 +09:00
|
|
|
caretta_sync.remote_node.RemoteNodeIdentifier remote_node = 1;
|
2025-09-29 07:44:53 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message AuthorizationRequestSendResponse {
|
2025-09-30 08:07:17 +09:00
|
|
|
caretta_sync.remote_node.RemoteNodeInfo remote_node_info = 1;
|
|
|
|
|
string passcode = 2;
|
2025-09-29 07:44:53 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message AuthorizationRequestInfo {
|
|
|
|
|
tripod_id.Double id = 1;
|
|
|
|
|
caretta_sync.common.PublicKey public_key = 2;
|
|
|
|
|
google.protobuf.Timestamp created_at = 3;
|
|
|
|
|
AuthorizationRequestKind kind = 4;
|
|
|
|
|
string node_info = 5;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message AuthorizationRequestIdentifier {
|
|
|
|
|
oneof identifier {
|
|
|
|
|
caretta_sync.common.Uuid uuid = 1;
|
|
|
|
|
tripod_id.Double id = 2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message AuthorizationRequestAcceptRequest {
|
|
|
|
|
AuthorizationRequestIdentifier authorization_request = 1;
|
|
|
|
|
string passcode = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message AuthorizationRequestAcceptResponse {
|
2025-09-30 08:07:17 +09:00
|
|
|
caretta_sync.authorized_node.AuthorizedNodeInfo authorized_node_info = 1;
|
2025-09-29 07:44:53 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message AuthorizationRequestRejectRequest {
|
|
|
|
|
AuthorizationRequestIdentifier authorization_request = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message AuthorizationRequestRejectResponse {
|
|
|
|
|
AuthorizationRequestInfo request_info = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message AuthorizationRequestInfoRequest {
|
|
|
|
|
AuthorizationRequestIdentifier request = 1;
|
|
|
|
|
}
|
|
|
|
|
message AuthorizationRequestInfoResponse{
|
|
|
|
|
AuthorizationRequestInfo info = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message AuthorizationRequestInfoStreamRequest {}
|
|
|
|
|
|
|
|
|
|
message AuthorizationRequestInfoStreamResponse {
|
|
|
|
|
AuthorizationRequestInfo request_info = 1;
|
|
|
|
|
}
|