void addUser(String username, String password) { principals.put(username, new GenericPrincipal(username, password, Collections.singletonList(AUTH_ROLE))); }
@Override protected Principal getPrincipal(String username) { // The authentication mechanism has authenticated the user so create // the Principal directly return new GenericPrincipal(username, null, null); } }
@Override protected Principal getPrincipal(String username) { // The authentication mechanism has authenticated the user so create // the Principal directly return new GenericPrincipal(username, null, null); } }
@Override protected GenericPrincipal createPrincipal(Principal userPrincipal, List<String> roles) { return new GenericPrincipal(userPrincipal.getName(), null, roles, userPrincipal, null); } };
@Override protected GenericPrincipal createPrincipal(Principal userPrincipal, List<String> roles) { return new GenericPrincipal(userPrincipal.getName(), null, roles, userPrincipal, null); } };
@Override protected GenericPrincipal createPrincipal(Principal userPrincipal, List<String> roles) { return new GenericPrincipal(userPrincipal.getName(), null, roles, userPrincipal, null); } };
@Override protected GenericPrincipal createPrincipal(Principal userPrincipal, List<String> roles) { return new GenericPrincipal(null, userPrincipal.getName(), null, roles, userPrincipal, null); } };
@Override protected GenericPrincipal createPrincipal(Principal userPrincipal, List<String> roles) { return new GenericPrincipal(userPrincipal.getName(), null, roles, userPrincipal, null); } };
@Override protected Principal getPrincipal(String username) { List<String> roles = new ArrayList<>(); return new GenericPrincipal(username, getPassword(username), roles); }
public GenericPrincipal getPrincipal() { return new GenericPrincipal(name, password, getRoles()!=null?Arrays.asList(getRoles()):null, userPrincipal); }
@Override protected Principal getPrincipal(String username) { return new GenericPrincipal(username, username, Arrays.asList("myrole")); } }
public GenericPrincipal getPrincipal() { return new GenericPrincipal(name, password, getRoles()!=null?Arrays.asList(getRoles()):null, userPrincipal); }
/** * Get the principal associated with the specified user. * @param username The user name * @return the Principal associated with the given user name. */ @Override protected synchronized Principal getPrincipal(String username) { return new GenericPrincipal(username, getPassword(username), getRoles(username)); }
/** * Return the Principal associated with the given user name. */ @Override protected synchronized Principal getPrincipal(String username) { return (new GenericPrincipal(username, getPassword(username), getRoles(username))); }
/** * 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. */ @Override protected synchronized Principal getPrincipal(String username) { return (new GenericPrincipal(username, getPassword(username), getRoles(username))); }
/** * Return the Principal associated with the given user name. */ @Override protected synchronized Principal getPrincipal(String username) { return (new GenericPrincipal(username, getPassword(username), getRoles(username))); }
/** * Return the Principal associated with the given user name. */ @Override protected synchronized Principal getPrincipal(String username) { return (new GenericPrincipal(username, getPassword(username), getRoles(username))); }
/** * Return the Principal associated with the given user name. */ @Override protected synchronized Principal getPrincipal(String username) { return (new GenericPrincipal(username, getPassword(username), getRoles(username))); }
/** * Return the Principal associated with the given user name. */ protected Principal getPrincipal(String username) { return (new GenericPrincipal(this, username, getPassword(username), getRoles(username))); }