shiro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jillian <cair...@gmail.com>
Subject Shiro logoutFilter not performing logout...
Date Sat, 20 Jul 2013 06:17:44 GMT
Hello,

I'm new to struts2 & shiro, and I'm trying to create a really simple sample
app (and I haven't found an example of this integration anywhere - so I
hope this is possible).  I'm using Tomcat7, Struts2 2.3.15, and Shiro 1.2.2


I've currently just got one action that grabs some database values and
displays them.  I have shiro protecting the namespace that action is in,
I'm using a very simple standard login.jsp and the users are currently
configured in the shiro.ini.  Log in works, redirects to the action, all is
well.

But I'm having trouble with a simple "logout" link on the results page. I'm
trying to use the logout filter.  Here's my shiro.ini (comments removed):

[main]
authc.loginUrl = /login.jsp
authc.successUrl  = /displayStudent
logout.redirectUrl = /logout.jsp

[urls]
login.jsp = ssl[8443], authc
/logout = logout
/student/** = authc
/** = authc

[users]
admin=hello
jill=bob


(logout.jsp is just a placeholder so I could see if the logout worked - in
the end it willl redirect to login)

My link is:

<a href="<s:url action="logoutAction"/>">LOGOUT</a>


And the struts.xml action for that link is:
       <action name="logoutAction">
          <result>/logout</result>
       </action>

The error I'm getting is your standard 404:

HTTP Status 404 - /b2mu-1.0/logout
type Status report
message /b2mu-1.0/logout
description The requested resource is not available.


And if I refresh the app I'm redirected to the protected content (ie, I'm
still logged in).  So I'm pretty sure the action is redirecting to the
appropriate url, which should be caught by shiro.   Am I missing some
logout filter configuration that I need?

Thanks!
Jillian

Mime
View raw message