Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard
 
ccac9974c8183f7f0d30e8cabd84ee0386e8cd97
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
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 (SecurityManager.getInstance().isExpectedPassword(pwd.toCharArray(), account
					.get(0).getSalt(), account.get(0).getPassword())) {
				
				return account.get(0);
			}
			return null;

		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}
}

Commits for RRRRHHHH_CoderuralHouses/src/businessLogic/LoginManager.java

Diff revisions: vs.
Revision Author Commited Message
85d983 ... Diff Diff camjan Wed 20 May, 2015 09:05:53 +0000

Booking deletion fixed some minor problems remain

25898b ... Diff Diff camjan Mon 18 May, 2015 15:26:01 +0000

Account adding and deleting fixed

4f8bcc ... Diff Diff epinzolas001 Mon 18 May, 2015 09:49:54 +0000

Merge conflicts solutioned

0f75b2 ... Diff Diff camjan Sat 16 May, 2015 14:34:49 +0000

Username is saved hashed and password hashed and salted

520867 ... Diff Diff pinene picture pinene Sun 19 Apr, 2015 14:09:12 +0000

tmp

2ac167 ... Diff Diff Eneko Pinzolas Murua Wed 15 Apr, 2015 13:53:44 +0000

admin completed

a92725 ... Diff Diff pinene picture pinene Fri 06 Mar, 2015 09:41:12 +0000

implemented lacking GUIs and corrected errors

d23286 ... Diff Diff unknown Tue 03 Mar, 2015 22:07:56 +0000

The code for different owner operations mostly implemented

1e12ff ... Diff Diff pinene picture 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

41f4d3 ... epinzolas001 Fri 27 Feb, 2015 12:55:15 +0000

Created Account class to separate identification from the Owner