Package com.webobjects.appserver

Examples of com.webobjects.appserver.WOCookie


    if (cookieString != null) {
      CookieDecoder cookieDecoder = new CookieDecoder();
      Set<Cookie> cookies = cookieDecoder.decode(cookieString);
      if(!cookies.isEmpty()) {
        for (Cookie cookie : cookies) {
          WOCookie wocookie = asWOCookie(cookie);
          _worequest.addCookie(wocookie);
        }
      }
    }
   
View Full Code Here


   *
   * @param cookie  Netty Cookie
   * @return  A WOCookie
   */
  public static WOCookie asWOCookie(Cookie cookie) {
    WOCookie wocookie = new WOCookie(
        cookie.getName(),
        cookie.getValue(),
        cookie.getPath(),
        cookie.getDomain(),
        cookie.getMaxAge(),
View Full Code Here

            session().terminate();
        }
        String[] keys = cookieKeys();
        for (int i = 0; i < keys.length; i++) {
            String key = keys[i];
            WOCookie dummyCookie = new WOCookie(key, "dummy");
            dummyCookie.setPath("/");
            dummyCookie.setDomain(null)// Let the browser set the domain
            dummyCookie.setExpires(new NSTimestamp().timestampByAddingGregorianUnits(0, -2, 0, 0, 0, 0));
            response.addCookie(dummyCookie);
        }
    }
View Full Code Here

    public WOActionResults logoutAction() {
      WORedirect redirect = (WORedirect) pageWithName("WORedirect");
      redirect.setUrl(context().directActionURLForActionNamed("entrance", null));
      WOResponse response = redirect.generateResponse();

      WOCookie loginCookie = new WOCookie("BTL", "-");
      loginCookie.setExpires(NSTimestamp.DistantFuture);
      loginCookie.setPath("/");
      response.addCookie(loginCookie);
     
      if (existingSession() != null) {
        existingSession().terminate();
    }
View Full Code Here

  public Selenium(WORequest request) {
    super(request);
  }
 
  public WOActionResults resetSessionAction() {
    WOCookie dummyCookie = new WOCookie("BTL", "dummy");
    dummyCookie.setPath("/");
    dummyCookie.setDomain(null)// Let the browser set the domain
    dummyCookie.setExpires(new NSTimestamp().timestampByAddingGregorianUnits(0, -2, 0, 0, 0, 0));
   
    WOResponse response = success();
    response.addCookie(dummyCookie);
        session().terminate();
        return response;
View Full Code Here

        }
        session.setUser(userObject);
        boolean isAdmin = userObject.isAdmin();
        D2W.factory().setWebAssistantEnabled(isAdmin);
        String encryptedIDPrimaryKey = ERXCrypto.crypterForAlgorithm(ERXCrypto.BLOWFISH).encrypt(userObject.primaryKey());
        WOCookie loginCookie=new WOCookie("BTL", rememberPassword ?  encryptedIDPrimaryKey : "-");
        loginCookie.setExpires(NSTimestamp.DistantFuture);
        loginCookie.setPath("/");
        context().response().addCookie(loginCookie);
        WOComponent nextPage = nextPage();
        return ((nextPage == null) ? pageWithName("HomePage") : nextPage);
    }
View Full Code Here

TOP

Related Classes of com.webobjects.appserver.WOCookie

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.