PDA

View Full Version : What is the relationship of UserDetail and Authentication



richardsang2004
Jan 6th, 2005, 05:30 PM
According to the java doc, the UserDetail holds information and later on to be stored inside the Authentication.
I am using my own AuthenticationDao impl, and it has a method loadxxx to return a Usertail object. If I have another object I need to use, how would I attack to the UserDetail so later I can get it from Authentication?

Ben Alex
Jan 7th, 2005, 05:02 AM
UserDetails is an interface.

Your AuthenticationDao can return any concrete implementation of UserDetails that you like. We suggest returning the included User, or a subclass, but there is nothing wrong with returning your own implementation instead.