Package org.apache.shiro.subject

Examples of org.apache.shiro.subject.Subject.logout()


                SubjectSecurityContext subjectSecurityContext = (SubjectSecurityContext) secCtx;
                Subject subject = subjectSecurityContext.getSubject();

                if (subject != null) {
                    try {
                        subject.logout();
                    } catch (Throwable t) {
                        String msg = "Unable to cleanly logout connection Subject during connection removal.  This is " +
                                "unexpected but not critical: it can be safely ignored because the " +
                                "connection will no longer be used.";
                        LOG.info(msg, t);
View Full Code Here


    Subject subject = getSubject(request, response);
    String redirectUrl = getRealRedirectUrl(request, subject);
    //try/catch added for SHIRO-298:
    try {
      if (subject != null && subject.getPrincipal() != null) {
        subject.logout();
      }
    } catch (SessionException ise) {
      log.debug("Encountered session exception during logout.  This can generally safely be ignored.", ise);
    }
    if (ThreadLocalKit.isJson()) {
View Full Code Here

            // Test whether user's role is authorized to perform functions in the permissions list
            authorizeUser(currentUser, exchange);
        } finally {
            if (policy.isAlwaysReauthenticate()) {
                currentUser.logout();
            }
        }
    }

    private void authenticateUser(Subject currentUser, ShiroSecurityToken securityToken) {
View Full Code Here

               
                    // Test whether user's role is authorized to perform functions in the permissions list 
                    authorizeUser(currentUser, exchange);
                } finally {
                    if (alwaysReauthenticate) {
                        currentUser.logout();
                        currentUser = null;
                    }
                }

            }
View Full Code Here

    Subject subject = getSubject(request, response);
    String redirectUrl = getRealRedirectUrl(request, subject);
    //try/catch added for SHIRO-298:
    try {
      if (subject != null && subject.getPrincipal() != null) {
        subject.logout();
      }
    } catch (SessionException ise) {
      log.debug("Encountered session exception during logout.  This can generally safely be ignored.", ise);
    }
    issueRedirect(request, response, redirectUrl);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.