Package org.opencustomer.webapp.auth

Examples of org.opencustomer.webapp.auth.Authenticator


                errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("module.common.login.error.noLdapConnection"));
            }
           
            if(errors.isEmpty()) {
                request.getSession().setAttribute(Globals.USER_KEY, user);
                request.getSession().setAttribute(Globals.AUTHENTICATOR_KEY, new Authenticator(user));
                request.getSession().setAttribute(org.apache.struts.Globals.LOCALE_KEY, user.getLocale());
                request.getSession().setAttribute(Globals.CONFIGURATION_KEY, new UserConfiguration(user));
               
                MenuFactory menuFactory = (MenuFactory)request.getSession().getServletContext().getAttribute(Globals.MENU_FACTORY_KEY);
                Menu menu = menuFactory.getCustomizedMenu(AuthenticatorUtility.getAuthenticator(request));
View Full Code Here


        if (user == null) {
            errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("module.common.login.error.invalidUserNamePassword"));
        } else {
           
            // validate rights if not web application
            Authenticator auth = new Authenticator(user);
            if((Type.WEBDAV.equals(type) && !auth.isValid(Right.EXTERN_WEBDAV_READ))
                    || (Type.WEBSERVICE.equals(type) && !auth.isValid(Right.EXTERN_WEBSERVICE_READ))) {
                if(log.isDebugEnabled())
                    log.debug("user has no access to webdav or webservice");
                errors.add("missingRights", new ActionMessage("default.error.invalidRights"));
            } else if (ipAddress != null && !IpAddressPatternValidator.getInstance().match(user.getProfile().getIpPattern(), ipAddress)) {
                if(log.isDebugEnabled())
View Full Code Here

        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))
            {
                jobList = new ArrayList<HashMap>();
                List<JobVO> jobs = new JobDAO().getByUser(uservo, startDate, endDate);        
                HashMap<String,String> jobMap;
                SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
View Full Code Here

        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))
            {
                JobVO job = new JobDAO().getById(id);
                if(status.equals(JobVO.Status.COMPLETED.toString()))
                    job.setStatus(JobVO.Status.COMPLETED);
                else if(status.equals(JobVO.Status.IN_PROGRESS.toString()))
View Full Code Here

        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))
            {
                UserConfiguration userConf = new UserConfiguration(uservo);
               
                eventList = new ArrayList<HashMap>();
                EventBeanCalculator calc = new EventBeanCalculator(uservo.getCalendar(),startDate,endDate);
View Full Code Here

        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)
                    && SignatureUtility.getInstance().isSignatureValid(uservo.getPassword(),password))
            {
                if(log.isInfoEnabled())
                    log.info("webdav session for user [" + user + "]");
                String session = user+":"+password;
View Full Code Here

    public void setResourceContent(String resourceUri, InputStream content, String contentType, String characterEncoding) throws AccessDeniedException
    {     
        if(user != null)
        {
            Authenticator auth = new Authenticator(user);
            if(!auth.isValid(Right.EXTERN_WEBDAV_WRITE))
            {
                if(log.isInfoEnabled())
                    log.info("no write rights for user");
                return ;
            }
View Full Code Here

TOP

Related Classes of org.opencustomer.webapp.auth.Authenticator

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.