Example usage for org.apache.wicket.util.cookies CookieDefaults setSecure

List of usage examples for org.apache.wicket.util.cookies CookieDefaults setSecure

Introduction

In this page you can find the example usage for org.apache.wicket.util.cookies CookieDefaults setSecure.

Prototype

public void setSecure(boolean secure) 

Source Link

Document

Indicates to the browser whether the cookie should only be sent using a secure protocol, such as HTTPS or SSL.

Usage

From source file:sf.wicklet.ext.auth.WxSecureAuthenticationStrategy.java

License:Apache License

/**
 * Make sure you always return a valid CookieUtils
 *
 * @return CookieUtils/*from   ww  w  . j av a 2 s.  c om*/
 */
protected CookieUtils getCookieUtils() {
    if (cookieUtils == null) {
        final CookieDefaults def = new CookieDefaults();
        def.setSecure(secure);
        cookieUtils = new CookieUtils(def);
    }
    return cookieUtils;
}