Search in sources :

Example 1 with ApiTokenRealmFactory

use of com.bakdata.conquery.models.config.auth.ApiTokenRealmFactory in project conquery by bakdata.

the class ApiTokenRealmTest method overrideConfig.

@Override
public ConqueryConfig overrideConfig(ConqueryConfig conf, final File workDir) {
    XodusStoreFactory storageConfig = (XodusStoreFactory) conf.getStorage();
    final Path storageDir = workDir.toPath().resolve(storageConfig.getDirectory().resolve(getClass().getSimpleName()));
    return conf.withStorage(storageConfig.withDirectory(storageDir)).withAuthenticationRealms(ImmutableList.<AuthenticationRealmFactory>builder().addAll(conf.getAuthenticationRealms()).add(new ApiTokenRealmFactory(storageDir, new XodusConfig())).build());
}
Also used : Path(java.nio.file.Path) XodusStoreFactory(com.bakdata.conquery.models.config.XodusStoreFactory) ApiTokenRealmFactory(com.bakdata.conquery.models.config.auth.ApiTokenRealmFactory) XodusConfig(com.bakdata.conquery.models.config.XodusConfig) AuthenticationRealmFactory(com.bakdata.conquery.models.config.auth.AuthenticationRealmFactory)

Aggregations

XodusConfig (com.bakdata.conquery.models.config.XodusConfig)1 XodusStoreFactory (com.bakdata.conquery.models.config.XodusStoreFactory)1 ApiTokenRealmFactory (com.bakdata.conquery.models.config.auth.ApiTokenRealmFactory)1 AuthenticationRealmFactory (com.bakdata.conquery.models.config.auth.AuthenticationRealmFactory)1 Path (java.nio.file.Path)1