8384858687888990
this.roles = new ArrayList<JAASRole>(); if (u.getRoleNames() != null) { Iterator<String> itor = u.getRoleNames().iterator(); while (itor.hasNext()) this.roles.add(new JAASRole((String)itor.next())); } }
62636465666768
public static Principal createUserPrincipal(String username) { return new JAASPrincipal(username); } public static Principal createRolePrincipal(String rolename) { return new JAASRole(rolename); }
104105106107108109110
assertTrue( lm.login() ); assertTrue( lm.commit() ); Set roles = subject.getPrincipals(JAASRole.class); assertEquals(1, roles.size()); assertTrue(roles.contains(new JAASRole("ldap-admin"))); }
8283848586878889
this.roles = new ArrayList(); if (u.getRoleNames() != null) { Iterator itor = u.getRoleNames().iterator(); while (itor.hasNext()) this.roles.add(new JAASRole((String)itor.next())); } }
103104105106107108109