Package net.sf.archimede.security

Examples of net.sf.archimede.security.AuthenticationException


        CredentialsWrapper cw = new CredentialsWrapper(this.username, this.password);
      
        try {
            if (this.username.equals(SystemPrincipal.getUsername())) {
                if (!cw.equals(SystemPrincipal.getCredentials())) {
                    throw new AuthenticationException("Wrong password");
                }
            } else if (!this.username.equals(AnonymousPrincipal.getUsername())) {
                //FIXME Tout le monde peut lire les comptes utilisateurs ??
               
                boolean exists = UserDao.createInstance().exists(this.username, this.password);
                //Warning, user is detached
                if (!exists) {
                    throw new AuthenticationException("Wrong username and/or password");
                }
            }
           
            HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
            request.getSession(true).setAttribute(SESSION_REF, this);           
View Full Code Here

TOP

Related Classes of net.sf.archimede.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.