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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trying to figure out preauthentication
 
Similar Threads
Spring security: initializing bean after succesful authentication?
spring security - dynamic role url
“j_spring_security_check” not found after configuring spring security without http namespace
Preauthentication problem
Spring Security 3: Salting password issue