Spring Security: Authentication returns null
Posted
by Mike
on Stack Overflow
See other posts from Stack Overflow
or by Mike
Published on 2010-05-17T08:37:01Z
Indexed on
2010/05/17
8:40 UTC
Read the original article
Hit count: 427
spring-security
Hi!
I implemented FilterInvocationSecurityMetadataSource.
in getAttribute, i am trying to extract the Authentication object to achieve the user and get his allowed views from the database:Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
but the authentication is null! why? how can i achieve it?
© Stack Overflow or respective owner