Package org.apache.shiro.session

Examples of org.apache.shiro.session.UnknownSessionException


        }
        Session s = retrieveSessionFromDataSource(sessionId);
        if (s == null) {
            //session ID was provided, meaning one is expected to be found, but we couldn't find one:
            String msg = "Could not find session with ID [" + sessionId + "]";
            throw new UnknownSessionException(msg);
        }
        return s;
    }
View Full Code Here


     * @throws UnknownSessionException if the id specified does not correspond to any session in the EIS.
     */
    public Session readSession(Serializable sessionId) throws UnknownSessionException {
        Session s = doReadSession(sessionId);
        if (s == null) {
            throw new UnknownSessionException("There is no session with id [" + sessionId + "]");
        }
        return s;
    }
View Full Code Here

  // 验证码校验
  protected void doCaptchaValidate(CaptchaUsernamePasswordToken token) {
    Session session = SecurityUtils.getSubject().getSession();
    if (session == null) {
      throw new UnknownSessionException("Unable found required Session");
    } else {
      if (session.getAttribute(DEFAULT_CAPTCHA_PARAM) != null) {
        String captcha = session.getAttribute(DEFAULT_CAPTCHA_PARAM).toString();
        // String captcha = CookieUtils.getCookie(request, AppConstants.CAPTCHA_NAME);
        if (token.getCaptcha() != null &&
View Full Code Here

  public Session getSession() {
    Subject subject = SecurityUtils.getSubject();
    Session session = subject.getSession();
    if (session == null) {
      throw new UnknownSessionException("Unable found required Session");
    } else {
      return session;
    }
  }
View Full Code Here

    private Session lookupRequiredSession(SessionKey key) throws SessionException {
        Session session = lookupSession(key);
        if (session == null) {
            String msg = "Unable to locate required Session instance based on SessionKey [" + key + "].";
            throw new UnknownSessionException(msg);
        }
        return session;
    }
View Full Code Here

     * @throws UnknownSessionException if the id specified does not correspond to any session in the EIS.
     */
    public Session readSession(Serializable sessionId) throws UnknownSessionException {
        Session s = doReadSession(sessionId);
        if (s == null) {
            throw new UnknownSessionException("There is no session with id [" + sessionId + "]");
        }
        return s;
    }
View Full Code Here

        }
        Session s = retrieveSessionFromDataSource(sessionId);
        if (s == null) {
            //session ID was provided, meaning one is expected to be found, but we couldn't find one:
            String msg = "Could not find session with ID [" + sessionId + "]";
            throw new UnknownSessionException(msg);
        }
        return s;
    }
View Full Code Here

  public Session getSession() {
    Subject subject = SecurityUtils.getSubject();
    Session session = subject.getSession();
    if (session == null) {
      throw new UnknownSessionException("Unable found required Session");
    } else {
      return session;
    }
  }
View Full Code Here

  // 验证码校验
  protected void doCaptchaValidate(CaptchaUsernamePasswordToken token) {
    Session session = SecurityUtils.getSubject().getSession();
    if (session == null) {
      throw new UnknownSessionException("Unable found required Session");
    } else {
      if (session.getAttribute(DEFAULT_CAPTCHA_PARAM) != null) {
        String captcha = session.getAttribute(DEFAULT_CAPTCHA_PARAM).toString();
        // String captcha = CookieUtils.getCookie(request, AppConstants.CAPTCHA_NAME);
        if (token.getCaptcha() != null &&
View Full Code Here

  public Session getSession() {
    Subject subject = SecurityUtils.getSubject();
    Session session = subject.getSession();
    if (session == null) {
      throw new UnknownSessionException("Unable found required Session");
    } else {
      return session;
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.shiro.session.UnknownSessionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.