public DBUser ValidateUser()

in src/main/java/com/microsoft/aad/oidcpoc/db.java [143:172]


	public DBUser ValidateUser(String userName, String password) {
		DBUser res = null;
        try {
            String selectSql = "SELECT * FROM [User] WHERE Email = ? AND Password = ?";
            PreparedStatement pstmt = connection.prepareStatement(selectSql);
            pstmt.setString(1, userName);
            pstmt.setString(2, password);

            ResultSet resultSet = pstmt.executeQuery();
            if (resultSet.next()) {
            	//we have a match
        		res = new DBUser();
        		res.UserId = resultSet.getInt("UserId");
        		res.Email = resultSet.getNString("Email");
        		res.FName = resultSet.getNString("FName");
        		res.LName = resultSet.getNString("LName");
        		res.UniqueId = resultSet.getNString("UniqueId");
            }
    		if (resultSet.next()) {
    			//we had more than one match
    			res = null;
    		}
    	    
    		connection.close();
	    }
	    catch (Exception e) {
	            e.printStackTrace();
	    }
		return res;
    }