/** * Immediately delegates to the underlying proxied session. */ public Object removeAttribute(Object key) throws InvalidSessionException { return delegate.removeAttribute(key); }
/** * Removes any existing subject state from the Subject's session (if the session exists). If the session * does not exist, this method does not do anything. * * @param subject the subject for which any existing subject state will be removed from its session. */ protected void removeFromSession(Subject subject) { Session session = subject.getSession(false); if (session != null) { session.removeAttribute(DefaultSubjectContext.AUTHENTICATED_SESSION_KEY); session.removeAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY); } }
private void clearRunAsIdentities() { Session session = getSession(false); if (session != null) { session.removeAttribute(RUN_AS_PRINCIPALS_SESSION_KEY); } }
/** * 移除shiro指定的sessionKey */ public static void removeSessionAttr(String key) { Session session = getSession(); if (session != null) session.removeAttribute(key); }
public void removeAttribute(String s) { try { Object attribute = getSession().removeAttribute(s); afterUnbound(s, attribute); } catch (InvalidSessionException e) { throw new IllegalStateException(e); } }
public static SavedRequest getAndClearSavedRequest(ServletRequest request) { SavedRequest savedRequest = getSavedRequest(request); if (savedRequest != null) { Subject subject = SecurityUtils.getSubject(); Session session = subject.getSession(); session.removeAttribute(SAVED_REQUEST_KEY); } return savedRequest; }
public Object removeAttribute(SessionKey sessionKey, Object attributeKey) throws InvalidSessionException { Session s = lookupRequiredSession(sessionKey); Object removed = s.removeAttribute(attributeKey); if (removed != null) { onChange(s); } return removed; }
private void tryToCleanSession(Session session) { Collection<Object> keys = session.getAttributeKeys(); for (Object key : keys) { session.removeAttribute(key); } } };
session.removeAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
/** * Immediately delegates to the underlying proxied session. */ public Object removeAttribute(Object key) throws InvalidSessionException { return delegate.removeAttribute(key); }
if (existingAuthc != null) { session.removeAttribute(DefaultSubjectContext.AUTHENTICATED_SESSION_KEY);
/** * Removes any existing subject state from the Subject's session (if the session exists). If the session * does not exist, this method does not do anything. * * @param subject the subject for which any existing subject state will be removed from its session. */ protected void removeFromSession(Subject subject) { Session session = subject.getSession(false); if (session != null) { session.removeAttribute(DefaultSubjectContext.AUTHENTICATED_SESSION_KEY); session.removeAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY); } }
private void clearRunAsIdentities() { Session session = getSession(false); if (session != null) { session.removeAttribute(RUN_AS_PRINCIPALS_SESSION_KEY); } }
public Object removeAttribute(SessionKey sessionKey, Object attributeKey) throws InvalidSessionException { Session s = lookupRequiredSession(sessionKey); Object removed = s.removeAttribute(attributeKey); if (removed != null) { onChange(s); } return removed; }
session.removeAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
if (existingAuthc != null) { session.removeAttribute(DefaultSubjectContext.AUTHENTICATED_SESSION_KEY);
/** * 移除shiro指定的sessionKey */ public static void removeSessionAttr(String key) { Session session = getSession(); if (session != null) session.removeAttribute(key); }
private void clearRunAsIdentities() { Session session = getSession(false); if (session != null) { session.removeAttribute(RUN_AS_PRINCIPALS_SESSION_KEY); } }
@SuppressWarnings("unchecked") @Override public V remove(K key) throws CacheException { V value = null; value = (V) getSession().removeAttribute(cacheKeyName); logger.debug("remove {} {}", cacheKeyName, key); return value; }
public static String getKaptcha(String key) { Object kaptcha = getSessionAttribute(key); if(kaptcha == null){ throw new RRException("验证码已失效"); } getSession().removeAttribute(key); return kaptcha.toString(); }