Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Performing authorization without authentication in spring

 
Joshua Antony
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Regards,
Joshua
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
http://static.springframework.org/spring-security/site/reference/html/authentication-common-auth-services.html#userdetails-and-associated-types

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic