Variable naming.

Some breaking changes in the communications with authd (some request
attributes renamed), but projects using AuthD::Client shouldn’t see
anything.
ipc07
Luka Vandervelden 2018-12-17 12:39:01 +09:00
parent 6a008daf87
commit 313536f996
2 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@ module AuthD
class GetTokenRequest
JSON.mapping({
# FIXME: Rename to "login" for consistency.
username: String,
login: String,
password: String
})
end
@ -34,9 +34,9 @@ module AuthD
initialize "auth"
end
def get_token?(username : String, password : String)
def get_token?(login : String, password : String)
send RequestTypes::GET_TOKEN.value.to_u8, {
:username => username,
:login => login,
:password => password
}.to_json

View File

@ -59,7 +59,7 @@ IPC::Service.new "auth" do |event|
next
end
user = passwd.get_user request.username, request.password
user = passwd.get_user request.login, request.password
if user.nil?
client.send ResponseTypes::INVALID_CREDENTIALS.value.to_u8, ""