aspose file tools*
The moose likes Spring and the fly likes Trying to figure out preauthentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Trying to figure out preauthentication" Watch "Trying to figure out preauthentication" New topic
Author

Trying to figure out preauthentication

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
0 down vote favorite
share [g+] share [fb] share [tw]


I am wondering how the PreAuthenticatedAuthenticationToken gets its authorities. I have a UserDetails implementation, but :

@Override
public Collection<GrantedAuthority> getAuthorities() {

return grantedAuthorities;
}

never gets called. This is important because Spring Security (3.1) is basically ignoring the fact that I am trying to limit this URL to a certain role. Without a role in the token, it is letting everything through. Using the UserDetailsByNameServiceWrapper doesn't work for me. Spring complains. I really could use some help. Thanks Eric



My UserDetails:




My context file:


</beans:beans>
John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
Here is my entire XXXUser class


John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
Figure it out! Four of the setting in my Useradetials were wrong
 
 
subject: Trying to figure out preauthentication