Davide Romanini wrote: > I'd want to create a simple extension of this provider to work > also with UsernamePasswordAuthenticationToken, but it doesn't work, > because it uses username as its principal object (???) and when I use a > custom domain object as my "principal" I loose the username! > It seems a small flaw in design: name, credentials and request details > should be seperated from user object (the "principal") so they don't > risk to change when the Authentication is processed.
You can successfully write an AuthenticationProvider and authentication mechanism which uses whatever notion of principal identity and authentication that you wish. The project includes such providers as X509, SiteMinder, CAS etc that do not rely on a traditional String username but some form of token. These illustrate the design works. It might be useful if you stepped back and explained what it is you are trying to do at a higher level. It seems to me you are customizing the system is unusual ways. Please take a read of Part I of the Reference Guide, which discusses the differences between authentication mechanisms and authentication providers, and then describe what you're trying to do here. We'll be happy to help you get it working in your project. Cheers Ben ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Home: http://acegisecurity.org Acegisecurity-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
