Examples of LDAPRealm


Examples of org.exist.security.realm.ldap.LDAPRealm

    }
   
    @Override
    public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
        final SecurityManager sm = context.getBroker().getBrokerPool().getSecurityManager();
        final LDAPRealm ldapRealm = getLdapRealm(sm);
        final String accountName = args[0].itemAt(0).getStringValue();
       
        final Account ldapAccount = sm.getAccount(accountName);
        if(ldapAccount == null)
            throw new XPathException("The Account '" + accountName + "' does not exist!");
       
        try {
            ldapRealm.refreshAccountFromLdap(ldapAccount);
        } catch(PermissionDeniedException pde) {
            throw new XPathException(this, pde);
        } catch(AuthenticationException ae) {
            throw new XPathException(this, ae);
        }
View Full Code Here

Examples of org.exist.security.realm.ldap.LDAPRealm

  public static void setUpBeforeClass() throws Exception {
    InputStream is = new ByteArrayInputStream(config.getBytes(UTF_8));
   
    Configuration config = Configurator.parse(is);

    realm = new LDAPRealm(null, config);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.