This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Spring and the fly likes authentication in spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "authentication in spring" Watch "authentication in spring" New topic
Author

authentication in spring

Shivaprakash Shettihalli
Greenhorn

Joined: Nov 20, 2007
Posts: 18
I'm developing an application. I want to implement authentication for the application. I am tring to intercept all the URLs. I tried the same with <intercept-url pattern="/**" access="ROLE_USER" />.
when i did that none of the URLs are getting redirected to the login page.
My requirement is to intercept all the URLs. Please help me out to achieve the same.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Well, my first guess is with that setting, you just secured your login page. So you have to login to see the login page, but you can't because you have to login first to login to login to login to login.

Make sure you do something like

<intercept-url pattern="login url here" filters="none"/>

or if you are using the latest Spring Security you can do similar with the <http> tag

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: authentication in spring