syntax = "proto3";

package auth;

message Cookie {
  string name = 1;
  string value = 2;
}

message RequestValidationOptions {
  string bearer_token = 1;
  repeated Cookie cookie = 2;
  optional string shared_vault_owner_context = 3;
}

message SessionValidationResponse {
  string cross_service_token = 1;
}

message WebsocketConnectionAuthorizationHeader {
  string token = 1;
}

message ConnectionValidationResponse {
  string cross_service_token = 1;
}

service Auth {
  rpc validate(RequestValidationOptions) returns (SessionValidationResponse) {}
  rpc validateWebsocket(WebsocketConnectionAuthorizationHeader) returns (ConnectionValidationResponse) {}
}
