From f9b55b6bb71244e0e40f63cee5374582aaa72bc9 Mon Sep 17 00:00:00 2001 From: phoenix Date: Tue, 16 Dec 2025 02:58:11 +0000 Subject: [PATCH] tsk-15: Add User Id to LoginResult (#21) Closes #15 Reviewed-on: https://git.kundeng.us/phoenix/textsender-models/pulls/21 Co-authored-by: phoenix Co-committed-by: phoenix --- tx0/token/token.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tx0/token/token.go b/tx0/token/token.go index f2be04e..a62607c 100644 --- a/tx0/token/token.go +++ b/tx0/token/token.go @@ -11,8 +11,13 @@ type Claims struct { jwt.RegisteredClaims } -type Login struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - ExpiresIn int64 `json:"expires_in"` +type LoginResult struct { + UserId uuid.UUID `json:"user_id"` + AccessToken string `json:"access_token"` + TokenType string `json:"token_type"` + ExpiresIn int64 `json:"expires_in"` } + +// Alias for LoginResult +// Will be deprecated at some point +type Login = LoginResult