This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes Performing authorization without authentication in spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Performing authorization without authentication in spring" Watch "Performing authorization without authentication in spring" New topic

Performing authorization without authentication in spring

Joshua Antony
Ranch Hand

Joined: Jun 05, 2006
Posts: 254
I have a web app, on calling its login page , we use filter and redirect to another web application where authentication takes place and then control is redirected again to my original web app.

Now I want to perform authorization, currently I am doing this by performing dummy authentication again in this web application by implementing UserDetailsService

My issue is that, I dont need authentication in this web app but only need authorization.

Is there any way by which we can perform only authorization in this web application?


Mark Spritzler

Joined: Feb 05, 2001
Posts: 17260

OK, well in order for Authorization to work, you have to be authenticated first. So Spring needs the Authentication loaded into the SecurityContext. If you can find a way to load the authentication for that third party app, then you are good to go.

You can always implement the UserDetails Service to use that third party as its mechanism. UserDetailsService is fully extensible.

Check out the Spring docs here


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
subject: Performing authorization without authentication in spring