• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Unsecured method in @Secured annotated class.

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic