Results 1 to 9 of 9

Thread: method not intercepted while authentication

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Posts
    17

    Default method not intercepted while authentication

    Hi
    i hav implemented my custom UserDetailsService and I am calling a secured method from loadUserByUserName(). But that method is not intercepted here. After the user is authenticated and logs in successfully, if I use that same secured method again it is intercepted. I tried to debug the code but found that chain is empty when that method is called from loadUserByUsername. But chain is populated with MethodSecurityInterceptor if same method is called from some where else.
    Is it the feature provided by SpringSecurity to not to intercept method while authentication? or I am making some mistake.
    Kindly help.

    Thanks

  2. #2
    Join Date
    Jun 2007
    Location
    Minsk, Belarus
    Posts
    217

    Default

    Is your secured method in the same class where loadUserByUserName implementation is?

    http://static.springframework.org/sp...ng-aop-proxies

  3. #3
    Join Date
    Oct 2008
    Posts
    17

    Default

    No its not part of that class. Its comlpetely different bean. Actually its a database API.

  4. #4
    Join Date
    Oct 2008
    Posts
    17

    Default

    Does anybody know about the problem i am facing. Please help

  5. #5
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    Please add your configuration as an attachment (not inline) - otherwise it's very difficult for people to work out what's happening.

  6. #6
    Join Date
    Oct 2008
    Posts
    17

    Default

    Hi Luke
    I hav attached configuration files. As u can see i have intercepted only database api. using this api i fetch user data from db in loadUserByUsername method of UserDetailsService.
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •