-
SecurityContext is always null
In Pentaho 3.6, Spring security 2.0.5 has been integrated. as per the Spring security documents, Spring Security Context always available in the application where it has been integrated.
Please look in this URL
http://static.springsource.org/sprin...-overview.html
Although , I know this is as per new version of Spring Security but pattern is stills same.
Actually , I need Spring Security Context available but whenever i try to get it . it gives me null..
Object obj = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
if (obj instanceof UserDetails) {
String username = ((UserDetails)obj).getUsername();
} else {
String username = obj.toString();
}
Any Suggestion Please.
I have used standard CAS SSO script that comes with 3.6 and i have done very basic tweaking for CAS proxy authentication.
/Chandra
-
Need more information. For example, where is the code above? In a filter?
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
-
Forum Rules