| syntax = "proto3"; |
| package teaclave_authentication_service_proto; |
| |
| import "teaclave_common.proto"; |
| |
| message UserRegisterRequest { |
| string id = 1; |
| string password = 2; |
| } |
| |
| message UserRegisterResponse { } |
| |
| message UserLoginRequest { |
| string id = 1; |
| string password = 2; |
| } |
| |
| message UserLoginResponse { |
| string token = 1; |
| } |
| |
| message UserAuthenticateRequest { |
| teaclave_common_proto.UserCredential credential = 1; |
| } |
| |
| message UserAuthenticateResponse { |
| bool accept = 1; |
| } |
| |
| service TeaclaveAuthenticationApi { |
| rpc UserRegister(UserRegisterRequest) returns (UserRegisterResponse); |
| rpc UserLogin (UserLoginRequest) returns (UserLoginResponse); |
| } |
| |
| service TeaclaveAuthenticationInternal { |
| rpc UserAuthenticate (UserAuthenticateRequest) returns (UserAuthenticateResponse); |
| } |