Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trying to figure out preauthentication

 
John Eric Hamacher
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my entire XXXUser class


 
John Eric Hamacher
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Figure it out! Four of the setting in my Useradetials were wrong
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic