-
Aug 8th, 2006, 03:26 PM
#1
Problem getting SecurityContext using SecurityContextHolder
Hello,
I am experiencing the following problem: after a successful login with ACEGI (using LDAP provider), I cannot access the newly SecurityContext using SescurityContextHolder.getSecurityContext() - the method returns null, but it works just fine if I get it from HTTP Session, by searching for the attribute HttpSessionContextIntegrationFilter.ACEGI_SECURITY _CONTEXT_KEY.
Any idea? Am I missing a setting somewhere?
If you need more details, let me know
Thanks.
-
Aug 8th, 2006, 03:37 PM
#2
This should be impossible. SecurityContextHolder.getContext() is guaranteed not to return null.
-
Aug 9th, 2006, 04:08 PM
#3
Actually, I made a mistake. The context is indeed not null, but the method getAuthentication, called on the context retrieved by using SecurityContextHolder.getContext() is null.
This is not happening when I get it from the HTTP session.
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