RRRRHHHH_Code
be38338a401f4444672a37df208c6125bd679d20
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
package businessLogic; import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; import java.util.Vector; import common.LoginInterface; import dataAccess.DB4oManager; import domain.Account; public class LoginManager extends UnicastRemoteObject implements LoginInterface { /** * */ private static final long serialVersionUID = 1L; DB4oManager dbMngr; public LoginManager() throws RemoteException { super(); try { dbMngr = DB4oManager.getInstance(); } catch (Exception e) { e.printStackTrace(); } } @Override public Account checkCredentials(String usr, String pwd) { Account ac = new Account(SecurityManager.getInstance().calculateHash( usr)); try { Vector<Account> account = dbMngr.getAccount(ac); if (account.isEmpty()) return null; if (SecurityManager.getInstance().isExpectedPassword( pwd.toCharArray(), account.get(0).getSalt(), account.get(0).getPassword())) { return account.get(0); } return null; } catch (Exception e) { e.printStackTrace(); } return null; } } |
Commits for RRRRHHHH_CoderuralHouses/src/businessLogic/LoginManager.java
Revision | Author | Commited | Message |
---|---|---|---|
be3833 ... Diff | camjan | Wed 20 May, 2015 22:55:11 +0000 | DB server side improved some problems when showing bookings remain |
85d983 ... Diff | camjan | Wed 20 May, 2015 09:05:53 +0000 | Booking deletion fixed some minor problems remain |
25898b ... Diff | camjan | Mon 18 May, 2015 15:26:01 +0000 | Account adding and deleting fixed |
4f8bcc ... Diff | epinzolas001 | Mon 18 May, 2015 09:49:54 +0000 | Merge conflicts solutioned |
0f75b2 ... Diff | camjan | Sat 16 May, 2015 14:34:49 +0000 | Username is saved hashed and password hashed and salted |
520867 ... Diff | pinene | Sun 19 Apr, 2015 14:09:12 +0000 | tmp |
2ac167 ... Diff | Eneko Pinzolas Murua | Wed 15 Apr, 2015 13:53:44 +0000 | admin completed |
a92725 ... Diff | pinene | Fri 06 Mar, 2015 09:41:12 +0000 | implemented lacking GUIs and corrected errors |
d23286 ... Diff | unknown | Tue 03 Mar, 2015 22:07:56 +0000 | The code for different owner operations mostly implemented |
1e12ff ... | pinene | Mon 02 Mar, 2015 09:12:44 +0000 | Database management was changed, now it opens the database and it closes it every time it is accessed. Furthermore, bug #17 was corrected |