private String getHost(SessionContext context) { String host = context.getHost(); if (host == null) { ServletRequest request = WebUtils.getRequest(context); if (request != null) { host = request.getRemoteHost(); } } return host; }
protected SessionContext createSessionContext() { SessionContext sessionContext = new DefaultSessionContext(); if (StringUtils.hasText(host)) { sessionContext.setHost(host); } return sessionContext; }
public Session createSession(SessionContext initData) { if (initData.getSessionId() != null) { return new HiggsSession(initData.getSessionId()); } return super.createSession(initData); } }
sessionCtx.setSessionId(sessionId); session = config.getSecurityManager().start(sessionCtx);
/** * Creates a new {@link SimpleSession SimpleSession} instance retaining the context's * {@link SessionContext#getHost() host} if one can be found. * * @param initData the initialization data to be used during {@link Session} creation. * @return a new {@link SimpleSession SimpleSession} instance */ public Session createSession(SessionContext initData) { if (initData != null) { String host = initData.getHost(); if (host != null) { return new SimpleSession(host); } } return new SimpleSession(); } }
protected SessionContext createSessionContext() { SessionContext sessionContext = new DefaultSessionContext(); if (StringUtils.hasText(host)) { sessionContext.setHost(host); } return sessionContext; }
/** * Creates a new {@link SimpleSession SimpleSession} instance retaining the context's * {@link SessionContext#getHost() host} if one can be found. * * @param initData the initialization data to be used during {@link Session} creation. * @return a new {@link SimpleSession SimpleSession} instance */ public Session createSession(SessionContext initData) { if (initData != null) { String host = initData.getHost(); if (host != null) { return new SimpleSession(host); } } return new SimpleSession(); } }
protected SessionContext createSessionContext() { SessionContext sessionContext = new DefaultSessionContext(); if (StringUtils.hasText(host)) { sessionContext.setHost(host); } return sessionContext; }
/** * Ensure {@link SimpleSessionImpl} is used and provides logging. */ @Override public Session createSession(final SessionContext initData) { log.trace("Creating session w/init-data: {}", initData); // duplicated from SimpleSessionFactory, retaining class-hierarchy for sanity if (initData != null) { String host = initData.getHost(); if (host != null) { return new SimpleSessionImpl(host); } } return new SimpleSessionImpl(); }
/** * Creates a new {@link SimpleSession SimpleSession} instance retaining the context's * {@link SessionContext#getHost() host} if one can be found. * * @param initData the initialization data to be used during {@link Session} creation. * @return a new {@link SimpleSession SimpleSession} instance */ public Session createSession(SessionContext initData) { if (initData != null) { String host = initData.getHost(); if (host != null) { return new SimpleSession(host); } } return new SimpleSession(); } }
@Override public Session createSession(SessionContext sessionContext) { JboneCasSession session = new JboneCasSession(); session.setServerName(jboneConfiguration.getSys().getServerName()); session.setHost(sessionContext.getHost()); return session; } }