Token responses send the UID as well.

This commit is contained in:
Luka Vandervelden 2020-04-25 10:34:07 +02:00
parent f6bbf77732
commit e1567258f4
2 changed files with 3 additions and 2 deletions

View File

@ -55,9 +55,10 @@ class AuthD::Response
end end
class Token < Response class Token < Response
property uid : Int32
property token : String property token : String
initialize :token initialize :token, :uid
end end
class User < Response class User < Response

View File

@ -71,7 +71,7 @@ class AuthD::Service
# change the date of the last connection # change the date of the last connection
@users_per_uid.update user.uid.to_s, user @users_per_uid.update user.uid.to_s, user
Response::Token.new token.to_s @jwt_key Response::Token.new (token.to_s @jwt_key), user.uid
when Request::AddUser when Request::AddUser
# No verification of the users' informations when an admin adds it. # No verification of the users' informations when an admin adds it.
# No mail address verification. # No mail address verification.