List of usage examples for org.apache.shiro.web.util WebUtils getRequest
public static ServletRequest getRequest(Object requestPairSource)
From source file:com.sonicle.webtop.core.app.shiro.WTContainerSessionManager.java
License:Open Source License
private String getHost(SessionContext context) { String host = context.getHost(); if (host == null) { ServletRequest request = WebUtils.getRequest(context); if (request != null) { host = request.getRemoteHost(); }//from w ww . ja v a 2s. c o m } return host; }
From source file:org.ow2.proactive.workflowcatalog.security.HttpHeaderTokenSessionManager.java
License:Open Source License
@Override public Serializable getSessionId(SessionKey sessionKey) { ServletRequest request = WebUtils.getRequest(sessionKey); if (request instanceof HttpServletRequest) { HttpServletRequest httpRequest = (HttpServletRequest) request; String tokenKeyHeader = httpRequest.getHeader(TOKEN_KEY); if (tokenKeyHeader == null) { return sessionKey.getSessionId(); }//from w w w . jav a2 s. c om return tokenKeyHeader; } else { return sessionKey.getSessionId(); } }
From source file:org.usergrid.rest.security.shiro.session.HttpRequestSessionManager.java
License:Apache License
private String getHost(SessionContext context) { String host = context.getHost(); if (host == null) { ServletRequest request = WebUtils.getRequest(context); if (request != null) { host = request.getRemoteHost(); }/*from w ww. j av a 2 s. c om*/ } return host; }