Package org.apache.roller.weblogger.ui.rendering.util.cache

Examples of org.apache.roller.weblogger.ui.rendering.util.cache.SaltCache


        authenticUser = null;
      }

      if (httpReq.getMethod().equals("POST") && authenticUser != null) {
        String salt = (String) httpReq.getParameter("salt");
        SaltCache saltCache = SaltCache.getInstance();
        if (salt == null || saltCache.get(salt) == null || !saltCache.get(salt).equals(authenticUser.getId())) {
          throw new ServletException("Security Violation");
        }
      }
   
    } catch (Exception e) {
View Full Code Here


        authenticUser = null;
      }

      if (httpReq.getMethod().equals("POST") && authenticUser != null) {
        String salt = (String) httpReq.getParameter("salt");
        SaltCache saltCache = SaltCache.getInstance();
        if (salt == null || saltCache.get(salt) == null || !saltCache.get(salt).equals(authenticUser.getId())) {
          throw new ServletException("Security Violation");
        }
      }
   
    } catch (Exception e) {
View Full Code Here

      } else {
        authenticUser = null;
      }

      if (authenticUser != null) {
        SaltCache saltCache = SaltCache.getInstance();
        String salt = RandomStringUtils.random(20, 0, 0, true, true, null, new SecureRandom());
        saltCache.put(salt, authenticUser.getId());
        httpReq.setAttribute("salt", salt);
      }

    } catch (Exception e) {
      log.error("Error loading salt", e);
View Full Code Here

TOP

Related Classes of org.apache.roller.weblogger.ui.rendering.util.cache.SaltCache

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.