@@ -0,0 +1,767 @@
+package com.elgregos.security.service;%0D%0A%0D%0Aimport javax.ejb.Singleton;%0D%0Aimport javax.inject.Inject;%0D%0A%0D%0Aimport com.elgregos.security.data.crud.UserCrudService;%0D%0Aimport com.elgregos.security.data.entities.User;%0D%0A%0D%0A@Singleton%0D%0Apublic class LoginVerifier %7B%0D%0A%0D%0A%09@Inject%0D%0A%09private UserCrudService userCrudService;%0D%0A%0D%0A%09@Inject%0D%0A%09private PasswordEncryptionService passwordEncryptionService;%0D%0A%0D%0A%09public boolean checkLogin(final String email, final String password) %7B%0D%0A%09%09final User user = userCrudService.find(email);%0D%0A%09%09if (user == null) %7B%0D%0A%09%09%09return false;%0D%0A%09%09%7D%0D%0A%09%09final String encryptedPassword = passwordEncryptionService.getEncryptedPassword(password, user.getSalt());%0D%0A%09%09if (user.getPassword().equals(encryptedPassword)) %7B%0D%0A%09%09%09return true;%0D%0A%09%09%7D%0D%0A%09%09return false;%0D%0A%09%7D%0D%0A%0D%0A%7D%0D%0A

Add login verifier