Changeset 30123

Show
Ignore:
Timestamp:
02/13/08 01:20:08 (9 months ago)
Author:
bstefanescu
Message:

fixed broken build by copying the NuxeoAuthenticationFilter?.java file form the branch

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/auth/NuxeoAuthenticationFilter.java

    r30112 r30123  
    239239        HttpServletRequest httpRequest = (HttpServletRequest) request; 
    240240 
    241         String deputy_login = (String) httpRequest.getAttribute(NXAuthContants.SWITCH_USER_KEY); 
    242  
    243         if(deputy_login==null) 
     241        String deputyLogin = (String) httpRequest.getAttribute(NXAuthContants.SWITCH_USER_KEY); 
     242 
     243        if (deputyLogin == null) { 
    244244            return false; 
     245        } 
    245246 
    246247        CachableUserIdentificationInfo cachableUserIdent = retrieveIdentityFromCache(httpRequest); 
     
    301302    } 
    302303 
    303  
    304304    public void doFilter(ServletRequest request, ServletResponse response, 
    305305            FilterChain chain) throws IOException, ServletException { 
    306306 
    307         String tokenPage = getRequestedPage(request); 
    308         if (tokenPage.equals(NXAuthContants.SWITCH_USER_PAGE)) 
    309          { 
    310             Boolean result = switchUser(request, response, chain); 
    311              if (result) 
    312                  return; 
    313        
     307        String tokenPage = getRequestedPage(request); 
     308        if (tokenPage.equals(NXAuthContants.SWITCH_USER_PAGE)) { 
     309            Boolean result = switchUser(request, response, chain); 
     310            if (result) { 
     311                return; 
     312            } 
     313       
    314314 
    315315        if (request instanceof NuxeoSecuredRequestWrapper) { 
     
    336336        HttpServletResponse httpResponse = (HttpServletResponse) response; 
    337337        Principal principal = httpRequest.getUserPrincipal(); 
    338  
    339         log.debug(httpRequest.getRequestURL().toString()); 
    340338 
    341339        if (principal == null) { 
     
    543541            } 
    544542        } 
    545         // FIXME: this can't work: NuxeoAuthenticationPluginLogoutExtension 
    546         // is not a subclass of NuxeoAuthenticationPlugin 
    547543        return false; 
    548544    } 
     
    570566        NuxeoAuthenticationPluginLogoutExtension logoutPlugin = null; 
    571567 
    572         // FIXME: this can't work: NuxeoAuthenticationPluginLogoutExtension 
    573         // is not a subclass of NuxeoAuthenticationPlugin 
    574568        if (authPlugin instanceof NuxeoAuthenticationPluginLogoutExtension) { 
    575569            logoutPlugin = (NuxeoAuthenticationPluginLogoutExtension) authPlugin; 
     
    644638            } 
    645639        } 
    646  
    647640        return false; 
    648641    } 
     
    652645            HttpServletRequest httpRequest = (HttpServletRequest) request; 
    653646            return getRequestedPage(httpRequest); 
    654         } 
    655         else 
     647        } else { 
    656648            return null; 
     649        } 
    657650    } 
    658651 
     
    685678        log.error("No auth plugin can be found to do the Login Prompt"); 
    686679        return false; 
    687     } 
    688  
    689     protected Boolean needSessionSaving(UserIdentificationInfo userInfo) { 
    690         String pluginName = userInfo.getAuthPluginName(); 
    691  
    692         AuthenticationPluginDescriptor desc = service.getDescriptor(pluginName); 
    693  
    694         if (desc.getStatefull()) { 
    695             return true; 
    696         } else { 
    697             if (desc.getNeedStartingURLSaving()) { 
    698                 return true; 
    699             } else { 
    700                 return false; 
    701             } 
    702         } 
    703680    } 
    704681 
     
    759736    } 
    760737 
     738    protected Boolean needSessionSaving(UserIdentificationInfo userInfo) { 
     739        String pluginName = userInfo.getAuthPluginName(); 
     740 
     741        AuthenticationPluginDescriptor desc = service.getDescriptor(pluginName); 
     742 
     743        if (desc.getStatefull()) { 
     744            return true; 
     745        } else { 
     746            return desc.getNeedStartingURLSaving(); 
     747        } 
     748    } 
     749 
    761750}