List of usage examples for org.apache.wicket.protocol.https HttpsConfig setPreferStateful
public void setPreferStateful(boolean preferStateful)
From source file:sf.wicklet.ext.test.arquillian.testauth01.TestApplication.java
License:Apache License
@Override protected void init() { super.init(); getSecuritySettings()/*from ww w. j av a 2 s. co m*/ .setAuthenticationStrategy(new WxSecureAuthenticationStrategy(LOGGED_IN_COOKIE_NAME, true)); getSecuritySettings().setCryptFactory(new CachingSunJceCryptFactory(DEFAUT_ENCRYPTION_KEY)); mountPage(TestSigninPage.MNT_PATH, TestApplication.TestSigninPage.class); mountPage(TestRememberPage.MNT_PATH, TestApplication.TestRememberPage.class); mountPage(TestLogoutPage.MNT_PATH, TestApplication.TestLogoutPage.class); mountPage(TestSignoutPage.MNT_PATH, TestApplication.TestSignoutPage.class); mountPage(TestSecurePage.MNT_PATH, TestApplication.TestSecurePage.class); final HttpsConfig config = new HttpsConfig(HTTP_PORT, HTTPS_PORT); config.setPreferStateful(false); setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), config)); }
From source file:sf.wicklet.gwt.site.server.WickletGwtSiteApplication.java
License:Apache License
@Override protected void init() { super.init(); getSecuritySettings()// ww w . ja v a2 s . c om .setAuthenticationStrategy(new WxSecureAuthenticationStrategy(IConfig.LOGGED_IN_COOKIE_NAME, true)); getSecuritySettings() .setCryptFactory(new CachingSunJceCryptFactory(Config.get().getDefaultEncryptionKey())); getPageSettings().setPageComponentInfoCodec( new DefaultPageComponentInfoCodec(RandomUtil.getSingleton().getString(8, 16))); mount(new MyMultiMapper("s", AdminService.class, Service.class)); mount(new MyMultiMapper("p", Login.class, Logout.class, Admin.class, User.class)); final IWickletSupport support = getWickletSupport(); final HttpsConfig config = new HttpsConfig(support.getHttpPort(), support.getHttpsPort()); config.setPreferStateful(false); setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), config)); }