public function authenticate(RMF\Request $request)
{
try {
$this->repository->setCurrentUser($this->repository->getUserService()->loadUserByCredentials($request->username, $request->password));
} catch (InvalidArgumentException $e) {
return false;
} catch (NotFoundException $e) {
throw new AuthenticationFailedException();
}
}