Responds with error on unknown login.
This commit is contained in:
parent
3ce1d78a50
commit
0fb17f3be6
@ -50,7 +50,11 @@ class AuthD::Service
|
|||||||
def handle_request(request : AuthD::Request?, connection : IPC::Connection)
|
def handle_request(request : AuthD::Request?, connection : IPC::Connection)
|
||||||
case request
|
case request
|
||||||
when Request::GetToken
|
when Request::GetToken
|
||||||
user = @users_per_login.get request.login
|
begin
|
||||||
|
user = @users_per_login.get request.login
|
||||||
|
rescue e : DODB::MissingEntry
|
||||||
|
return Response::Error.new "invalid credentials"
|
||||||
|
end
|
||||||
|
|
||||||
if user.password_hash != hash_password request.password
|
if user.password_hash != hash_password request.password
|
||||||
return Response::Error.new "invalid credentials"
|
return Response::Error.new "invalid credentials"
|
||||||
|
Loading…
Reference in New Issue
Block a user