shiro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AndyW <andy.wilk...@gmail.com>
Subject Problem setting up form based authentication with Shiro, Guice, Jersey, Jetty, no shiro.ini
Date Mon, 17 Dec 2012 10:06:33 GMT
Hello,

I'm trying to set up a new project using Shiro with Guice, Jersey, Jetty,
and a custom realm. I'm trying to use Guice to configure Shiro instead of an
ini file.

The problem I'm having is with using AUTHC for form based authentication.
When I use AUTHC_BASIC, the browser based authentication works just as
expected, but I need to change it to form based.

When I use AUTHC, Shiro correctly identifies when I request a protected
resource, and redirects to login.jsp. All good so far, but when I submit the
login form the login.jsp page reloads, and there's no indication that my
realm has been accessed.

This feels like I'm making a schoolboy error here, but I've gone around in
circles for hours and read the samples at
http://svn.apache.org/repos/asf/shiro/trunk/samples/guice/ as well as every
similar post I can find, without getting anywhere! I would be very grateful
if someone could give me a hand.

Here's some of my code that I think is relevant (sorry if I've missed out
anything useful, please let me know) - hopefully the glaring error will be
obvious. I'm sure a lot of it will be recognisable from a mash of online
examples!

** My GuiceServletContextListener


** My Jetty/Guice bootstrap:



** My login.jsp:



Sorry if this has been a bit on the long side - thanks for reading this far.
Really, any help would be appreciated.

Thanks,
Andy.




--
View this message in context: http://shiro-user.582556.n2.nabble.com/Problem-setting-up-form-based-authentication-with-Shiro-Guice-Jersey-Jetty-no-shiro-ini-tp7578065.html
Sent from the Shiro User mailing list archive at Nabble.com.

Mime
View raw message