codemp/proto/auth.proto
alemi 1cf17dc151 chore: proto cleanup and simplification
reuse as much as possible, keep rpc messages close with their rpc,
helper struct for uuid with into() and from(). also replaced the simple
things, such as imports and struct fields
2024-02-07 01:09:28 +01:00

20 lines
462 B
Protocol Buffer

syntax = "proto2";
package auth;
// authenticates users, issuing tokens
service Auth {
// send credentials and join a workspace, returns ready to use token
rpc Login (WorkspaceJoinRequest) returns (Token);
}
message Token {
required string token = 1;
}
// TODO one-request-to-do-it-all from login to workspace access
message WorkspaceJoinRequest {
required string username = 1;
required string password = 2;
optional string workspace_id = 3;
}