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
|
class GetTokenRequest
|
||||||
JSON.mapping({
|
JSON.mapping({
|
||||||
# FIXME: Rename to "login" for consistency.
|
# FIXME: Rename to "login" for consistency.
|
||||||
username: String,
|
login: String,
|
||||||
password: String
|
password: String
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
@ -34,9 +34,9 @@ module AuthD
|
||||||
initialize "auth"
|
initialize "auth"
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_token?(username : String, password : String)
|
def get_token?(login : String, password : String)
|
||||||
send RequestTypes::GET_TOKEN.value.to_u8, {
|
send RequestTypes::GET_TOKEN.value.to_u8, {
|
||||||
:username => username,
|
:login => login,
|
||||||
:password => password
|
:password => password
|
||||||
}.to_json
|
}.to_json
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ IPC::Service.new "auth" do |event|
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
||||||
user = passwd.get_user request.username, request.password
|
user = passwd.get_user request.login, request.password
|
||||||
|
|
||||||
if user.nil?
|
if user.nil?
|
||||||
client.send ResponseTypes::INVALID_CREDENTIALS.value.to_u8, ""
|
client.send ResponseTypes::INVALID_CREDENTIALS.value.to_u8, ""
|
||||||
|
|
Loading…
Reference in New Issue