Spring Security: Authentication returns null
- by Mike
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?