Hi Mike

[EMAIL PROTECTED] wrote:

I'm using cas for authentication and I'd like to be able to take advantage
of the new UserDetails inteface on the client side. Correct me if I'm
wrong but if I were using the DaoAuthenticationProvider I'd simply
overload the createSuccessAuthentication to return my custom
Authentication object that would provide access to additional custom data
returned in the user object.


Usually you'd usually return the custom UserDetails implementation (or, more commonly, your subclass of User) directly from your AuthenticationDao. createSuccessAuthentication on the other hand is provided so people needing to create complex Authentication objects can do so. For instance, they might need to store more than one credentials token, such as a password _and_ a ZIP code.

It doesn't appear that the CasAuthenticationProvider to support this
method of taking advantage of custom data in the same way. Does anyone
have any ideas on how I could go about getting this functionality with
CAS?


Just customise your AuthenticationDao's loadUserByUsername method, and the Authentication token generated by the CAS packages should contain your custom UserDetails.

Best regards
Ben



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Acegisecurity-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer

Reply via email to