Variable naming.
Some breaking changes in the communications with authd (some request attributes renamed), but projects using AuthD::Client shouldn’t see anything.ipc07
parent
6a008daf87
commit
313536f996
|
@ -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
|
||||
|
||||
|
|
|
@ -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, ""
|
||||
|
|
Loading…
Reference in New Issue