/** * Return the Principal associated with the given user name. */ protected synchronized Principal getPrincipal(DirContext context, String username) throws NamingException { User user = getUser(context, username); return new GenericPrincipal(this, user.username, user.password , getRoles(context, user)); }
/** * Return the Principal associated with the given user name. */ protected synchronized Principal getPrincipal(DirContext context, String username) throws NamingException { User user = getUser(context, username); if (user != null) { return new GenericPrincipal(user.getUserName(), user.getPassword(), getRoles(context, user)); } return null; }
/** * Return the Principal associated with the given user name. */ protected synchronized Principal getPrincipal(DirContext context, String username) throws NamingException { User user = getUser(context, username); if (user != null) { return new GenericPrincipal(user.getUserName(), user.getPassword(), getRoles(context, user)); } return null; }
/** * Return the Principal associated with the given user name. */ protected synchronized Principal getPrincipal(DirContext context, String username) throws NamingException { User user = getUser(context, username); if (user != null) { return new GenericPrincipal(user.getUserName(), user.getPassword(), getRoles(context, user)); } return null; }
roles = getRoles(context, user);
roles = getRoles(context, user);
roles = getRoles(context, user);
roles = getRoles(context, user);
roles = getRoles(context, user);