Search in sources :

Example 1 with DefaultSessionContext

use of org.apache.shiro.session.mgt.DefaultSessionContext in project shiro by apache.

the class DefaultSecurityManager method createSessionContext.

protected SessionContext createSessionContext(SubjectContext subjectContext) {
    DefaultSessionContext sessionContext = new DefaultSessionContext();
    if (!CollectionUtils.isEmpty(subjectContext)) {
        sessionContext.putAll(subjectContext);
    }
    Serializable sessionId = subjectContext.getSessionId();
    if (sessionId != null) {
        sessionContext.setSessionId(sessionId);
    }
    String host = subjectContext.resolveHost();
    if (host != null) {
        sessionContext.setHost(host);
    }
    return sessionContext;
}
Also used : Serializable(java.io.Serializable) DefaultSessionContext(org.apache.shiro.session.mgt.DefaultSessionContext)

Aggregations

Serializable (java.io.Serializable)1 DefaultSessionContext (org.apache.shiro.session.mgt.DefaultSessionContext)1