List of usage examples for org.apache.shiro.session.mgt SessionContext setSessionId
void setSessionId(Serializable sessionId);
From source file:org.ow2.proactive.workflowcatalog.SchedulerAuthentication.java
License:Open Source License
private static Subject createSubject(String token, ISchedulerProxy scheduler) { SessionContext sessionContext = new DefaultSessionContext(); sessionContext.setSessionId(token); sessionContext.put(HttpHeaderTokenSessionManager.TOKEN_KEY, token); sessionContext.put(SchedulerRestSession.SCHEDULER_SESSION_KEY, scheduler); Session session = SecurityUtils.getSecurityManager().start(sessionContext); return new Subject.Builder().session(session).buildSubject(); }