public Principal authentify (final String userName, final Object credentials) throws AuthException { if (this.refreshEachTime) this.refresh(); //this.refresh(); return this.passwd.authentify(userName, credentials); }
public Passwd (final String name, final java.util.List principalList, final java.util.Map grantMap) { this.name = name; this.principalList = principalList; this.grantMap = grantMap; buildPrincipalMap(); }
public java.util.Map getGrants () { checkAccess(); return this.passwd.getGrants(); }
private Object doEncodePasswd (final Passwd p) throws AuthException { org.jdom.Element ePasswd = new org.jdom.Element(PASSWD); ePasswd.setAttribute (NAME, p.getName()); // // output principals java.util.Iterator it = p.getPrincipalMap().values().iterator(); while (it.hasNext()) { ePasswd.addContent ((org.jdom.Element)principalCodec.encodePrincipal ((Principal)it.next(), null, null)); } // // output grants it = p.getGrantMap().values().iterator(); while (it.hasNext()) { ePasswd.addContent(encodeGrant((Grant)it.next())); } // // return result return ePasswd; }
passwd.getGrantMap().values().iterator(); while (it.hasNext()) it = passwd.getPrincipalMap().values().iterator(); while (it.hasNext())
new Passwd(name, principals, grantMap);
public PermissionCollection getPermissions (Subject subject) throws AuthException { return this.passwd.getPermissions(subject); }
public java.util.List getPrincipals () { checkAccess(); return this.passwd.getPrincipals(); }
protected void checkAccess () { final java.util.Map params = new java.util.HashMap(1); params.put(Permission.NAME, this.passwd.getName()); java.security.AccessController.checkPermission (new UmanPermission(params)); }
final Principal principal = extractsEffectivePrincipal(domain);
java.util.Iterator it = p.getPrincipalMap().values().iterator(); while (it.hasNext()) java.util.Iterator it = p.getGrantMap().values().iterator(); while (it.hasNext())
public Passwd decodePasswd () throws AuthException { OwfeDataSource ds = null; try { ds = SqlUtils.lookupDataSource(context, serviceParams); } catch (final ServiceException se) { throw new AuthException ("didn't find data source", se); } try { return new Passwd ("passwd", // ???????????TODO?????????????????????????????? decodePrincipals(ds.getConnection()), decodeGrants(ds.getConnection())); } catch (Exception e) { throw new AuthException ("failed to load passwd info", e); } finally { ds.releaseConnection(); } }
try passwdPermissions = this.passwd.getPermissions(pd);
public synchronized void updatePrincipals (final java.util.List principals) { this.principalList = principals; buildPrincipalMap(); }