try { sm=BrokerPool.getInstance().getSecurityManager(); } catch (EXistException e) { LOG.warn("Failed to get security manager in validate: ",e); return false; } if(sm instanceof LDAPbindSecurityManager ) { if( ((LDAPbindSecurityManager)sm).bind(user,passwd)) return true; else return false; }
    public final boolean validate( String passwd ) {       if (password==null && digestPassword==null) {            return true;       }       if ( passwd == null ) {            return false;       }       if (password!=null) {          if (MD5.md(passwd,true).equals( password )) {             return true;          }       }       if (digestPassword!=null) {           if (digest( passwd ).equals( digestPassword )) {              return true;           }       }       return false;    }