Token responses send the UID as well.
This commit is contained in:
parent
f6bbf77732
commit
e1567258f4
@ -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
|
||||||
|
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user