diff --git a/src/authd.cr b/src/authd.cr index c36f65d..7d2575d 100644 --- a/src/authd.cr +++ b/src/authd.cr @@ -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 diff --git a/src/main.cr b/src/main.cr index 381e676..b49d068 100644 --- a/src/main.cr +++ b/src/main.cr @@ -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, ""