Search in sources :

Example 1 with GroupProvider

use of io.prestosql.spi.security.GroupProvider in project hetu-core by openlookeng.

the class GroupProviderManager method setConfiguredGroupProvider.

private void setConfiguredGroupProvider(String name, Map<String, String> properties) {
    requireNonNull(name, "name is null");
    requireNonNull(properties, "properties is null");
    log.info("-- Loading group provider %s --", name);
    GroupProviderFactory groupProviderFactory = groupProviderFactories.get(name);
    checkState(groupProviderFactory != null, "Group provider %s is not registered", name);
    GroupProvider groupProvider = groupProviderFactory.create(ImmutableMap.copyOf(properties));
    checkState(configuredGroupProvider.compareAndSet(Optional.empty(), Optional.of(groupProvider)), "groupProvider is already set");
    log.info("-- Loaded group provider %s --", name);
}
Also used : GroupProvider(io.prestosql.spi.security.GroupProvider) GroupProviderFactory(io.prestosql.spi.security.GroupProviderFactory)

Aggregations

GroupProvider (io.prestosql.spi.security.GroupProvider)1 GroupProviderFactory (io.prestosql.spi.security.GroupProviderFactory)1