use of io.kamax.mxisd.config.MatrixConfig in project mxisd by kamax-io.
the class ExecStoreTest method getMatrixCfg.
protected MatrixConfig getMatrixCfg() {
MatrixConfig mxCfg = new MatrixConfig();
mxCfg.setDomain(domain);
return mxCfg;
}
use of io.kamax.mxisd.config.MatrixConfig in project mxisd by kamax-io.
the class LdapAuthTest method singleDn.
@Test
public void singleDn() {
LdapConfig cfg = new GenericLdapConfig();
cfg.getConnection().setHost(host);
cfg.getConnection().setPort(65001);
cfg.getConnection().setBaseDn(dnList.get(0));
cfg.getConnection().setBindDn(mxisdCn);
cfg.getConnection().setBindPassword(mxisdPw);
cfg.build();
LdapConfig.UID uid = new LdapConfig.UID();
uid.setType(idType);
uid.setValue(idAttribute);
cfg.getAttribute().setUid(uid);
MatrixConfig mxCfg = new MatrixConfig();
mxCfg.setDomain(domain);
mxCfg.build();
LdapAuthProvider p = new LdapAuthProvider(cfg, mxCfg);
BackendAuthResult result = p.authenticate(MatrixID.from(userId, domain).valid(), userPw);
assertFalse(result.isSuccess());
}
use of io.kamax.mxisd.config.MatrixConfig in project mxisd by kamax-io.
the class RestThreePidProviderTest method before.
@Before
public void before() {
MatrixConfig mxCfg = new MatrixConfig();
mxCfg.setDomain("example.org");
mxCfg.build();
RestBackendConfig cfg = new RestBackendConfig();
cfg.setEnabled(true);
cfg.setHost("http://localhost:65000");
cfg.getEndpoints().getIdentity().setSingle(lookupSinglePath);
cfg.getEndpoints().getIdentity().setBulk(lookupBulkPath);
cfg.build();
p = new RestThreePidProvider(cfg, mxCfg);
lookupSingleRequest = new SingleLookupRequest();
lookupSingleRequest.setType(ThreePidMedium.Email.getId());
lookupSingleRequest.setThreePid("john.doe@example.org");
ThreePidMapping m1 = new ThreePidMapping();
m1.setMedium(ThreePidMedium.Email.getId());
m1.setValue("john.doe@example.org");
ThreePidMapping m2 = new ThreePidMapping();
m1.setMedium(ThreePidMedium.PhoneNumber.getId());
m1.setValue("123456789");
lookupBulkList = new ArrayList<>();
lookupBulkList.add(m1);
lookupBulkList.add(m2);
}
Aggregations