File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ syntax = "proto3" ;
2+
3+ package geniustechspace.shared.v1 ;
4+
5+ import "google/protobuf/timestamp.proto" ;
6+
7+ message UserRegistrationRequest {
8+ string username = 1 ;
9+ optional string email = 2 ;
10+ optional string phone_number = 3 ;
11+ optional string password = 4 ;
12+ }
13+
14+ message UserRegistrationSuccess {
15+ string user_id = 1 ;
16+ string message = 2 ;
17+ }
18+
19+ message UserLoginRequest {
20+ string username = 1 ;
21+ string password = 2 ;
22+ }
23+
24+ message UserLoginSuccess {
25+ User user = 1 ;
26+ repeated AuthToken token = 2 ;
27+ string message = 3 ;
28+ }
29+
30+ message AuthToken {
31+ string context = 1 ; // access, refresh, etc.
32+ string token = 2 ;
33+ google.protobuf.Timestamp expiry = 3 ;
34+ }
35+
36+ message TokenPayload {
37+ string user_id = 1 ;
38+ string token_id = 2 ;
39+ repeated string scopes = 4 ;
40+ google.protobuf.Timestamp expiry = 5 ;
41+ }
You can’t perform that action at this time.
0 commit comments