-
Jul 25th, 2011, 01:54 AM
#1
How to access HttpServletRequest in accessdecisionManager in spring security 3
Hi Guys,
I had to write my own accessdecisionmanager and i have overriden decide method of it.
I want to have access to HttpServletRequest.
Can somebody help me how to get HttpServletobject ?
I require that object because my authorization is based on some request parameterds
Thanks and Regards
Patil Abhijeet
-
Jul 25th, 2011, 07:42 AM
#2
If you are using it in the FilterSecurityInterceptor, then you can cast the second argument in the decide method to a FilterInvocation (which has a reference to the request object).
-
Jul 26th, 2011, 12:05 AM
#3
I have written my class which implements AccessDecisionManager. I am not using any FilterSecurityInterceptor.
But I can change my implmentation if required what do you suggest ?
-
Jul 26th, 2011, 01:35 PM
#4
Try what I suggested above (casting the object to a FilterInvocation instance).
If that fails, explain how you are actually using the AccessDecisionManager. If you are using it for method security (i.e. not in the web layer) then you won't have access to the request object.
-
Jul 27th, 2011, 09:01 AM
#5
Ok i think its not working the way i want to i will find some other alternative
thx Luke
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules