Search in sources :

Example 1 with WordpressConfig

use of io.kamax.mxisd.config.wordpress.WordpressConfig in project mxisd by kamax-io.

the class WordpressStoreSupplier method accept.

@Override
public void accept(Mxisd m) {
    WordpressConfig wpCfg = m.getConfig().getWordpress();
    MatrixConfig mxCfg = m.getConfig().getMatrix();
    if (m.getConfig().getWordpress().isEnabled()) {
        WordpressRestBackend restBackend = new WordpressRestBackend(wpCfg, m.getHttpClient());
        WordressSqlBackend sqlBackend = new WordressSqlBackend(wpCfg);
        AuthProviders.register(() -> new WordpressAuthProvider(restBackend));
        DirectoryProviders.register(() -> new WordpressDirectoryProvider(wpCfg, sqlBackend, mxCfg));
        ThreePidProviders.register(() -> new WordpressThreePidProvider(mxCfg, wpCfg, sqlBackend));
    }
}
Also used : MatrixConfig(io.kamax.mxisd.config.MatrixConfig) WordpressConfig(io.kamax.mxisd.config.wordpress.WordpressConfig)

Aggregations

MatrixConfig (io.kamax.mxisd.config.MatrixConfig)1 WordpressConfig (io.kamax.mxisd.config.wordpress.WordpressConfig)1