Package org.nxplanner.security

Examples of org.nxplanner.security.AuthenticationException


    boolean isPasswordMatched(Person person, String password) throws Exception {
        log.log(loggingPriority, "evaluating password match for " + person.getUserId());
        String storedPassword = person.getPassword();
        if (storedPassword == null) {
            throw new AuthenticationException("null password in database for " + person.getUserId());
        }
        byte[] storedPasswordBytesWithSalt = Base64.decode(storedPassword.getBytes());

        if (storedPasswordBytesWithSalt.length < 12) {
            throw new AuthenticationException("invalid password data for " + person.getUserId());
        }
        byte[] salt = new byte[12];
        System.arraycopy(storedPasswordBytesWithSalt, 0, salt, 0, 12);

        MessageDigest md = MessageDigest.getInstance("MD5");
View Full Code Here


            throws AuthenticationException {
        int id = 0;
        try {
            id = ((Integer) PropertyUtils.getProperty(resource, "id")).intValue();
        } catch (Exception e) {
            throw new AuthenticationException(e);
        }
        return hasPermission(projectId, personId, getTypeOfResource(resource),
                id, permission);
    }
View Full Code Here

                    (List) permissionsByProjectMap.get(new Integer(projectId))) ||
                    permissionMatches(permissionName, resourceType, resourceId,
                            (List) permissionsByProjectMap.get(new Integer(0)));
            return authorized;
        } catch (Exception e) {
            throw new AuthenticationException(e);
        }
    }
View Full Code Here

                    setInteger("projectId", projectId).
                    setInteger("includeWildcardProject",
                            includeWildcardProject ? 1 : 0).
                    list();
        } catch (HibernateException e) {
            throw new AuthenticationException(e);
        }
    }
View Full Code Here

                }
            }
        } catch (AuthenticationException e) {
            throw e;
        } catch (Exception e) {
            throw new AuthenticationException(e);
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of org.nxplanner.security.AuthenticationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.