Package org.sf.bee.app.server.web.cookies

Examples of org.sf.bee.app.server.web.cookies.WebCookieAuth


        return null;
    }
   
    public WebCookieAuth lookupCookies(final String cookies,
            final List<Cookie> output) {
        WebCookieAuth cookieAuth = null;
        if (StringUtils.hasText(cookies)) {
            final String[] tokens = CollectionUtils.delimitedListToStringArray(
                    cookies, ";");
            for (final String token : tokens) {
                final WebCookie cookie = new WebCookie(token.trim());
                output.add(cookie);
                if (WebCookieAuth.NAME.equalsIgnoreCase(cookie.getName())) {
                    cookieAuth = new WebCookieAuth(cookie);
                }
            }
        }
        return cookieAuth;
    }
View Full Code Here


                result = _response.getCookie(WebCookieAuth.NAME);
            } else if(_request.hasCookieAuth()){
                result = _request.getAuthCookie();
            } else {
                // create new one
                result = new WebCookieAuth();
                ((WebCookieAuth)result).setLang(_request.getLangCode());
            }
            // update response buffer
            _response.setCookie(result);
        }
View Full Code Here

                : entity);
    }
   
    public void setAuthCookie(final String userid, final String lang){
        if(null!=_response){
            final WebCookieAuth cookie = new WebCookieAuth();
            cookie.setUserid(userid);
            cookie.setLang(lang);
            _response.setCookie(cookie);
        }
    }
View Full Code Here

TOP

Related Classes of org.sf.bee.app.server.web.cookies.WebCookieAuth

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.