public Map<GroupPrincipal, String> listGroups() { Map<GroupPrincipal, String> result = new HashMap<GroupPrincipal, String>(); for (String name : users.keySet()) { if (name.startsWith(GROUP_PREFIX)) { result.put(new GroupPrincipal(name.substring(GROUP_PREFIX.length())), users.get(name)); } } return result; }
public void handleRoles(Subject subject,Set<Principal> principals,String discriminator) { Group group = new GroupPrincipal(discriminator); for(Principal p:principals) { if(p instanceof RolePrincipal) { group.addMember(p); } else { subject.getPrincipals().add(p); } } subject.getPrincipals().add(group); } };
private List<GroupPrincipal> listGroups(String userName) { List<GroupPrincipal> result = new ArrayList<GroupPrincipal>(); String userInfo = (String)users.get(userName); if (userInfo != null) { String[] infos = userInfo.split(","); for (int i = 1; i < infos.length; i++) { String name = infos[i]; if (name.startsWith(GROUP_PREFIX)) { result.add(new GroupPrincipal(name.substring(GROUP_PREFIX.length()))); } } } return result; }
public void handleRoles(Subject subject,Set<Principal> principals,String discriminator) { Group group = new GroupPrincipal(discriminator); for(Principal p:principals) { if(p instanceof RolePrincipal) { group.addMember(p); } else { subject.getPrincipals().add(p); } } subject.getPrincipals().add(group); } };
private List<GroupPrincipal> listGroups(String userName) { List<GroupPrincipal> result = new ArrayList<>(); String userInfo = users.get(userName); if (userInfo != null) { String[] infos = userInfo.split(","); for (int i = 1; i < infos.length; i++) { String name = infos[i]; if (name.startsWith(GROUP_PREFIX)) { result.add(new GroupPrincipal(name.substring(GROUP_PREFIX.length()))); } } } return result; }
private List<GroupPrincipal> listGroups(String userName) { List<GroupPrincipal> result = new ArrayList<>(); String userInfo = users.get(userName); if (userInfo != null) { String[] infos = userInfo.split(","); for (int i = 1; i < infos.length; i++) { String name = infos[i]; if (name.startsWith(GROUP_PREFIX)) { result.add(new GroupPrincipal(name.substring(GROUP_PREFIX.length()))); } } } return result; }
private List<GroupPrincipal> listGroups(String userName) { List<GroupPrincipal> result = new ArrayList<>(); String userInfo = users.get(userName); if (userInfo != null) { String[] infos = userInfo.split(","); for (int i = 1; i < infos.length; i++) { String name = infos[i]; if (name.startsWith(GROUP_PREFIX)) { result.add(new GroupPrincipal(name.substring(GROUP_PREFIX.length()))); } } } return result; }
private List<GroupPrincipal> listGroups(String userName) { List<GroupPrincipal> result = new ArrayList<>(); String userInfo = users.get(userName); if (userInfo != null) { String[] infos = userInfo.split(","); for (int i = 1; i < infos.length; i++) { String name = infos[i]; if (name.startsWith(GROUP_PREFIX)) { result.add(new GroupPrincipal(name.substring(GROUP_PREFIX.length()))); } } } return result; }
public Map<GroupPrincipal, String> listGroups() { Map<GroupPrincipal, String> result = new HashMap<>(); for (String name : users.keySet()) { if (name.startsWith(GROUP_PREFIX)) { result.put(new GroupPrincipal(name.substring(GROUP_PREFIX.length())), users.get(name)); } } return result; }
public Map<GroupPrincipal, String> listGroups() { Map<GroupPrincipal, String> result = new HashMap<>(); for (String name : users.keySet()) { if (name.startsWith(GROUP_PREFIX)) { result.put(new GroupPrincipal(name.substring(GROUP_PREFIX.length())), users.get(name)); } } return result; }
public Map<GroupPrincipal, String> listGroups() { Map<GroupPrincipal, String> result = new HashMap<>(); for (String name : users.keySet()) { if (name.startsWith(GROUP_PREFIX)) { result.put(new GroupPrincipal(name.substring(GROUP_PREFIX.length())), users.get(name)); } } return result; }
public Map<GroupPrincipal, String> listGroups() { Map<GroupPrincipal, String> result = new HashMap<>(); for (String name : users.keySet()) { if (name.startsWith(GROUP_PREFIX)) { result.put(new GroupPrincipal(name.substring(GROUP_PREFIX.length())), users.get(name)); } } return result; }
@Override public List<GroupPrincipal> listGroups(UserPrincipal principal) { try { try (Connection connection = dataSource.getConnection()) { List<GroupPrincipal> roles = new ArrayList<>(); for (String role : rawSelect(connection, selectRolesQuery, principal.getName())) { if (role.startsWith(GROUP_PREFIX)) { roles.add(new GroupPrincipal(role.substring(GROUP_PREFIX.length()))); } } return roles; } } catch (SQLException e) { throw new RuntimeException("Error deleting role", e); } }
@Override public List<GroupPrincipal> listGroups(UserPrincipal principal) { try { try (Connection connection = dataSource.getConnection()) { List<GroupPrincipal> roles = new ArrayList<>(); for (String role : rawSelect(connection, selectRolesQuery, principal.getName())) { if (role.startsWith(GROUP_PREFIX)) { roles.add(new GroupPrincipal(role.substring(GROUP_PREFIX.length()))); } } return roles; } } catch (SQLException e) { throw new RuntimeException("Error deleting role", e); } }
for (String role : roles) { if (role.startsWith(BackingEngine.GROUP_PREFIX)) { principals.add(new GroupPrincipal(role.substring(BackingEngine.GROUP_PREFIX.length()))); for (String r : JDBCUtils.rawSelect(connection, roleQuery, role)) { principals.add(new RolePrincipal(r));
for (String role : roles) { if (role.startsWith(BackingEngine.GROUP_PREFIX)) { principals.add(new GroupPrincipal(role.substring(BackingEngine.GROUP_PREFIX.length()))); for (String r : JDBCUtils.rawSelect(connection, roleQuery, role)) { principals.add(new RolePrincipal(r));
if (infos[i].trim().startsWith(PropertiesBackingEngine.GROUP_PREFIX)) { principals.add(new GroupPrincipal(infos[i].trim().substring(PropertiesBackingEngine.GROUP_PREFIX.length()))); String groupInfo = users.get(infos[i].trim()); if (groupInfo != null) {
if (infos[i].trim().startsWith(PropertiesBackingEngine.GROUP_PREFIX)) { principals.add(new GroupPrincipal(infos[i].trim().substring(PropertiesBackingEngine.GROUP_PREFIX.length()))); String groupInfo = users.get(infos[i].trim()); if (groupInfo != null) {
if (infos[i].trim().startsWith(BackingEngine.GROUP_PREFIX)) { principals.add(new GroupPrincipal(infos[i].trim().substring(BackingEngine.GROUP_PREFIX.length()))); String groupInfo = users.get(infos[i].trim()); if (groupInfo != null) {
if (infos[i].trim().startsWith(BackingEngine.GROUP_PREFIX)) { principals.add(new GroupPrincipal(infos[i].trim().substring(BackingEngine.GROUP_PREFIX.length()))); String groupInfo = users.get(infos[i].trim()); if (groupInfo != null) {