2024-02-01 17:54:36 +01:00
|
|
|
syntax = "proto2";
|
|
|
|
|
2024-02-05 23:31:06 +01:00
|
|
|
package auth;
|
|
|
|
|
2024-02-01 17:54:36 +01:00
|
|
|
// authenticates users, issuing tokens
|
|
|
|
service Auth {
|
2024-02-07 01:09:28 +01:00
|
|
|
// send credentials and join a workspace, returns ready to use token
|
2024-02-01 17:54:36 +01:00
|
|
|
rpc Login (WorkspaceJoinRequest) returns (Token);
|
|
|
|
}
|
|
|
|
|
|
|
|
message Token {
|
|
|
|
required string token = 1;
|
|
|
|
}
|
|
|
|
|
2024-02-07 01:09:28 +01:00
|
|
|
// TODO one-request-to-do-it-all from login to workspace access
|
2024-02-01 17:54:36 +01:00
|
|
|
message WorkspaceJoinRequest {
|
2024-02-07 01:09:28 +01:00
|
|
|
required string username = 1;
|
|
|
|
required string password = 2;
|
|
|
|
optional string workspace_id = 3;
|
2024-02-01 17:54:36 +01:00
|
|
|
}
|