Send email addresses on login.

migration
Philippe PITTOLI 2024-07-07 20:02:19 +02:00
parent 8f7c3f5b0d
commit dbb4486fb1
2 changed files with 5 additions and 2 deletions

View File

@ -11,7 +11,8 @@ class AuthD::Request
# On successuful connection: store the authenticated user in a hash. # On successuful connection: store the authenticated user in a hash.
authd.logged_users[fd] = user.to_public authd.logged_users[fd] = user.to_public
Response::Login.new (token.to_s authd.configuration.secret_key), user.uid Response::Login.new (token.to_s authd.configuration.secret_key), user.uid,
user.contact.email, user.contact.pending_email
end end
IPC::JSON.message Login, 0 do IPC::JSON.message Login, 0 do

View File

@ -2,7 +2,9 @@ class AuthD::Response
IPC::JSON.message Login, 1 do IPC::JSON.message Login, 1 do
property uid : UInt32 property uid : UInt32
property token : String property token : String
def initialize(@token, @uid) property current_email : String? = nil
property pending_email : String? = nil
def initialize(@token, @uid, @current_email, @pending_email)
end end
end end
AuthD.responses << Login AuthD.responses << Login