{
if(childClass == User.class)
{
String username = (String) attributes.get("name");
String password = (String) attributes.get("password");
Principal p = new UsernamePrincipal(username);
if(createUser(username, password,null))
{
@SuppressWarnings("unchecked")
C principalAdapter = (C) new PrincipalAdapter(p);