use of org.finos.legend.server.pac4j.LegendPac4jBundle in project legend-engine by finos.
the class Server method initialize.
@Override
public void initialize(Bootstrap<ServerConfiguration> bootstrap) {
bootstrap.addBundle(new AssetsBundle("/web", "/", "legend_index.html"));
bootstrap.addBundle(new SwaggerBundle<ServerConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(ServerConfiguration configuration) {
return configuration.swagger;
}
});
bootstrap.addBundle(new HostnameHeaderBundle());
bootstrap.addBundle(new LegendPac4jBundle<>(serverConfiguration -> serverConfiguration.pac4j));
bootstrap.addBundle(new SessionAttributeBundle());
bootstrap.addBundle(new MultiPartBundle());
PureProtocolObjectMapperFactory.withPureProtocolExtensions(bootstrap.getObjectMapper());
VaultFactory.withVaultConfigurationExtensions(bootstrap.getObjectMapper());
ObjectMapperFactory.withStandardConfigurations(bootstrap.getObjectMapper());
bootstrap.getObjectMapper().registerSubtypes(new NamedType(LegendDefaultDatabaseAuthenticationFlowProviderConfiguration.class, "legendDefault"));
}
use of org.finos.legend.server.pac4j.LegendPac4jBundle in project legend-shared by finos.
the class StaticServerBundle method initialize.
@SuppressWarnings("unchecked")
@Override
public void initialize(Bootstrap<?> bootstrap) {
bootstrap.addBundle(new HostnameHeaderBundle());
bootstrap.addBundle(new LegendPac4jBundle<>(c -> configSupplier.apply((C) c).getPac4j()));
bootstrap.addBundle(new OpenTracingBundle());
bootstrap.addBundle(new LocalAssetBundle<>("web", c -> configSupplier.apply((C) c).getLocalAssetPaths()));
}
Aggregations