use of org.apache.knox.gateway.services.security.impl.ZookeeperRemoteAliasService in project knox by apache.
the class ZookeeperTokenStateService method init.
@Override
public void init(GatewayConfig config, Map<String, String> options) throws ServiceLifecycleException {
final ZookeeperRemoteAliasService zookeeperAliasService = (ZookeeperRemoteAliasService) aliasServiceFactory.create(gatewayServices, ALIAS_SERVICE, config, options, ZookeeperRemoteAliasService.class.getName());
options.put(ZookeeperRemoteAliasService.OPTION_NAME_SHOULD_CREATE_TOKENS_SUB_NODE, "true");
options.put(ZookeeperRemoteAliasService.OPTION_NAME_SHOULD_USE_LOCAL_ALIAS, "false");
zookeeperAliasService.registerRemoteTokenStateChangeListener(this);
zookeeperAliasService.init(config, options);
super.setAliasService(zookeeperAliasService);
super.init(config, options);
options.remove(ZookeeperRemoteAliasService.OPTION_NAME_SHOULD_CREATE_TOKENS_SUB_NODE);
options.remove(ZookeeperRemoteAliasService.OPTION_NAME_SHOULD_USE_LOCAL_ALIAS);
}
Aggregations