auth.proto 680 B

123456789101112131415161718192021222324252627282930313233343536
  1. syntax = "proto3";
  2. package pb;
  3. import "google/api/annotations.proto";
  4. import "user.proto";
  5. message AuthStatusRequest {
  6. }
  7. message AuthAuthenticateRequest {
  8. string username = 1;
  9. string password = 2;
  10. }
  11. service AuthService {
  12. rpc Status (AuthStatusRequest) returns (AuthStatusResponse) {
  13. option (google.api.http) = {
  14. get: "/v1/auth/status"
  15. //body: "*"
  16. };}
  17. rpc Authenticate (AuthAuthenticateRequest) returns (AuthAuthenticateResponse) {
  18. option (google.api.http) = {
  19. post: "/v1/auth/authenticate"
  20. body: "*"
  21. };}
  22. }
  23. message AuthStatusResponse {
  24. UserResponse.User user = 1;
  25. }
  26. message AuthAuthenticateResponse {
  27. string token = 1;
  28. }