Package org.opencustomer.util.logon

Examples of org.opencustomer.util.logon.Logon


            if (log.isInfoEnabled())
                log.info("user session is already active ... login is not necessary");

            forward = LOGIN_OK;
        } else if (form.getDoLogin() != null) {  
            Logon logon;
           
            if(!SystemConfiguration.getInstance().getBooleanValue(SystemConfiguration.Key.LDAP_AUTHENTICATION_ENABLED)){
                if(log.isDebugEnabled())
                    log.debug("do local login");
                logon = new LocalLogon();
            } else {
                if(log.isDebugEnabled())
                    log.debug("do ldap login");
                logon = new LdapLogon();         
            }
           
            UserVO user = logon.validate(form.getLogin(), form.getPassword(), request.getRemoteAddr(), Logon.Type.WEBAPP, errors);
           
            if((user == null || !errors.isEmpty()) && SystemConfiguration.getInstance().getBooleanValue(SystemConfiguration.Key.LDAP_AUTHENTICATION_ENABLED) && !LdapUtil.getInstance().testLdapConnection()) {
                errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("module.common.login.error.noLdapConnection"));
            }
           
View Full Code Here


     */
    public List<HashMap> getJobs(String user, String password, Date startDate, Date endDate)
    {
        ArrayList<HashMap> jobList = null;

        Logon logon;
       
        if(!SystemConfiguration.getInstance().getBooleanValue(SystemConfiguration.Key.LDAP_AUTHENTICATION_ENABLED)){
            if(log.isDebugEnabled())
                log.debug("do local login");
            logon = new LocalLogon();
        }    
        else
        {
            if(log.isDebugEnabled())
                log.debug("do ldap login");
            logon = new LdapLogon();         
        }
       
        ActionErrors errors = new ActionErrors();
        UserVO uservo = logon.validate(user, password, Logon.Type.WEBSERVICE, errors);
       
        if(uservo != null && errors.isEmpty())
        {      
            Authenticator auth = new Authenticator(uservo);
            if(auth.isValid(Right.EXTERN_WEBSERVICE_READ))
View Full Code Here

     * @param status the new status of the job
     * @return true if successfull otherwise false
     */
    public boolean setJobStatus(String user, String password, int id, String status)
    {
        Logon logon;
       
        if(!SystemConfiguration.getInstance().getBooleanValue(SystemConfiguration.Key.LDAP_AUTHENTICATION_ENABLED)){
            if(log.isDebugEnabled())
                log.debug("do local login");
            logon = new LocalLogon();
        }    
        else
        {
            if(log.isDebugEnabled())
                log.debug("do ldap login");
            logon = new LdapLogon();         
        }
       
        ActionErrors errors = new ActionErrors();
        UserVO uservo = logon.validate(user, password, Logon.Type.WEBSERVICE, errors);
       
        if(uservo != null && errors.isEmpty())
        {
            Authenticator auth = new Authenticator(uservo);
            if(auth.isValid(Right.EXTERN_WEBSERVICE_WRITE))
View Full Code Here

     */
    public List<HashMap> getEvents(String user, String password, Date startDate, Date endDate)
    {
        ArrayList<HashMap> eventList = null;
    
        Logon logon;
       
        if(!SystemConfiguration.getInstance().getBooleanValue(SystemConfiguration.Key.LDAP_AUTHENTICATION_ENABLED)){
            if(log.isDebugEnabled())
                log.debug("do local login");
            logon = new LocalLogon();
        }    
        else
        {
            if(log.isDebugEnabled())
                log.debug("do ldap login");
            logon = new LdapLogon();         
        }
       
        ActionErrors errors = new ActionErrors();
        UserVO uservo = logon.validate(user, password, Logon.Type.WEBSERVICE, errors);
       
        if(uservo != null && errors.isEmpty())
        {     
            Authenticator auth = new Authenticator(uservo);
            if(auth.isValid(Right.EXTERN_WEBSERVICE_READ))
View Full Code Here

     @return the session or null if the authenification failed
     *  @param user username
     *  @param password password
     */
    public Object getAuthenticationSession(String user, String password) {
        Logon logon;
       
        if(!SystemConfiguration.getInstance().getBooleanValue(SystemConfiguration.Key.LDAP_AUTHENTICATION_ENABLED)){
            if(log.isDebugEnabled())
                log.debug("do local login");
            logon = new LocalLogon();
        }    
        else
        {
            if(log.isDebugEnabled())
                log.debug("do ldap login");
            logon = new LdapLogon();         
        }
       
        ActionErrors errors = new ActionErrors();
        UserVO uservo = logon.validate(user, password, Logon.Type.WEBDAV, errors);
       
        if(uservo != null && errors.isEmpty())
        {
            Authenticator auth = new Authenticator(uservo);
            if(auth.isValid(Right.EXTERN_WEBDAV_READ, Right.EXTERN_WEBDAV_WRITE)
View Full Code Here

TOP

Related Classes of org.opencustomer.util.logon.Logon

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.