/** * @see org.apache.shiro.session.Session#getId() */ public Serializable getId() { return key.getSessionId(); }
protected Serializable getSessionId(SessionKey sessionKey) { return sessionKey.getSessionId(); }
public DelegatingSession(NativeSessionManager sessionManager, SessionKey key) { if (sessionManager == null) { throw new IllegalArgumentException("sessionManager argument cannot be null."); } if (key == null) { throw new IllegalArgumentException("sessionKey argument cannot be null."); } if (key.getSessionId() == null) { String msg = "The " + DelegatingSession.class.getName() + " implementation requires that the " + "SessionKey argument returns a non-null sessionId to support the " + "Session.getId() invocations."; throw new IllegalArgumentException(msg); } this.sessionManager = sessionManager; this.key = key; }
sessionId = key.getSessionId();
/** * @see org.apache.shiro.session.Session#getId() */ public Serializable getId() { return key.getSessionId(); }
protected Serializable getSessionId(SessionKey sessionKey) { return sessionKey.getSessionId(); }
public DelegatingSession(NativeSessionManager sessionManager, SessionKey key) { if (sessionManager == null) { throw new IllegalArgumentException("sessionManager argument cannot be null."); } if (key == null) { throw new IllegalArgumentException("sessionKey argument cannot be null."); } if (key.getSessionId() == null) { String msg = "The " + DelegatingSession.class.getName() + " implementation requires that the " + "SessionKey argument returns a non-null sessionId to support the " + "Session.getId() invocations."; throw new IllegalArgumentException(msg); } this.sessionManager = sessionManager; this.key = key; }
/** * @see org.apache.shiro.session.Session#getId() */ public Serializable getId() { return key.getSessionId(); }
protected Serializable getSessionId(SessionKey sessionKey) { return sessionKey.getSessionId(); }
public DelegatingSession(NativeSessionManager sessionManager, SessionKey key) { if (sessionManager == null) { throw new IllegalArgumentException("sessionManager argument cannot be null."); } if (key == null) { throw new IllegalArgumentException("sessionKey argument cannot be null."); } if (key.getSessionId() == null) { String msg = "The " + DelegatingSession.class.getName() + " implementation requires that the " + "SessionKey argument returns a non-null sessionId to support the " + "Session.getId() invocations."; throw new IllegalArgumentException(msg); } this.sessionManager = sessionManager; this.key = key; }
sessionId = key.getSessionId();
@Override public Session getSession(SessionKey key) throws SessionException { // Retrieve the VaadinSession for the current user. VaadinSession vaadinSession = sessionProvider.get(); String attributeName = SESSION_ATTRIBUTE_PREFIX + key.getSessionId(); if (vaadinSession != null) { // If we have a valid VaadinSession, try to get the Shiro Session. SimpleSession shiroSession = (SimpleSession) vaadinSession.getAttribute(attributeName); if (shiroSession != null) { // Make sure the Shiro Session hasn't been stopped or expired (i.e. the // user logged out). if (shiroSession.isValid()) { return shiroSession; } else { // This is an invalid or expired session so we'll clean it up. vaadinSession.setAttribute(attributeName, null); } } } return null; } }
@Override public Session getSession(SessionKey key) throws SessionException { // Retrieve the VaadinSession for the current user. VaadinSession vaadinSession = sessionProvider.get(); String attributeName = SESSION_ATTRIBUTE_PREFIX + key.getSessionId(); if (vaadinSession != null) { // If we have a valid VaadinSession, try to get the Shiro Session. SimpleSession shiroSession = (SimpleSession) vaadinSession.getAttribute(attributeName); if (shiroSession != null) { // Make sure the Shiro Session hasn't been stopped or expired (i.e. the // user logged out). if (shiroSession.isValid()) { return shiroSession; } else { // This is an invalid or expired session so we'll clean it up. vaadinSession.setAttribute(attributeName, null); } } } return null; } }