This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unsecured method in @Secured annotated class.

 
Bogdan Baraila
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to all,

Is there away to unsecure just a single method from a spring service that is annotated with the @Secured annotation. I know that I could annotate just the method I want and leave the unsecured one without an annotation, but since all except one are secured methods i would prefer to leave the annotation at class level.

Thanks.
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope you cant put it at the class level unless you want all the methods secured. However, method level annotations override the class one, so say if you have an Anonymous role, you could override the class level annotation by adding an @Secured("ROLE_ANNONYMOUS") on just that method.
 
Bogdan Baraila
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bill. Indeed the ROLE_ANNONYMOUS should work, but unfortunately i'm using Spring security with flex and i wasn't able to set up the anonymous filtering.
 
Kannan Mugundan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Did you solve the problem, I am using Spring BlazeDS Integration. I wanted to unsecure a single method (Change password in case of password expiry, I want user to change password, before allowing a successful login.)
I also added @Secured ({ROLE_ANNONYMOUS}),
I also have Flex channels secured in


Any help on how to do this is appreciated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic