Send email addresses on login.
This commit is contained in:
parent
8f7c3f5b0d
commit
dbb4486fb1
@ -11,7 +11,8 @@ class AuthD::Request
|
||||
# On successuful connection: store the authenticated user in a hash.
|
||||
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
|
||||
|
||||
IPC::JSON.message Login, 0 do
|
||||
|
@ -2,7 +2,9 @@ class AuthD::Response
|
||||
IPC::JSON.message Login, 1 do
|
||||
property uid : UInt32
|
||||
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
|
||||
AuthD.responses << Login
|
||||
|
Loading…
Reference in New Issue
Block a user