/** * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart() */ @Override protected void doStart() throws Exception { super.doStart(); // can be null so we switch to previous behaviour using PropertyUserStore if (_userStore == null) { if(LOG.isDebugEnabled()) LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: " + _config + " hotReload: " + hotReload); PropertyUserStore propertyUserStore = new PropertyUserStore(); propertyUserStore.setHotReload(hotReload); propertyUserStore.setConfigPath(_config); propertyUserStore.start(); _userStore = propertyUserStore; _userStoreAutoCreate = true; } }
/** * Make a {@link UserStore} from a password file. * {@link PropertyUserStore} for details. */ public static UserStore makeUserStore(String passwordFile) { PropertyUserStore propertyUserStore = new PropertyUserStore(); propertyUserStore.setConfig(passwordFile); propertyUserStore.setHotReload(true); try { propertyUserStore.start(); } catch (Exception ex) { throw new RuntimeException("UserStore", ex); } return propertyUserStore; }
/** * Make a {@link UserStore} from a password file. * {@link PropertyUserStore} for details. */ public static UserStore makeUserStore(String passwordFile) { PropertyUserStore propertyUserStore = new PropertyUserStore(); propertyUserStore.setConfig(passwordFile); propertyUserStore.setHotReload(true); try { propertyUserStore.start(); } catch (Exception ex) { throw new RuntimeException("UserStore", ex); } return propertyUserStore; }
private void setupPropertyUserStore(Map<String, ?> options) { parseConfig(options); if (_propertyUserStores.get(_filename) == null) { PropertyUserStore propertyUserStore = new PropertyUserStore(); propertyUserStore.setConfig(_filename); propertyUserStore.setRefreshInterval(_refreshInterval); PropertyUserStore prev = _propertyUserStores.putIfAbsent(_filename, propertyUserStore); if (prev == null) { LOG.debug("setupPropertyUserStore: Starting new PropertyUserStore. PropertiesFile: " + _filename + " refreshInterval: " + _refreshInterval); try { propertyUserStore.start(); } catch (Exception e) { LOG.warn("Exception while starting propertyUserStore: ",e); } } } }
private void setupPropertyUserStore(Map<String, ?> options) { parseConfig(options); if (_propertyUserStores.get(_filename) == null) { PropertyUserStore propertyUserStore = new PropertyUserStore(); propertyUserStore.setConfig(_filename); propertyUserStore.setRefreshInterval(_refreshInterval); PropertyUserStore prev = _propertyUserStores.putIfAbsent(_filename, propertyUserStore); if (prev == null) { LOG.debug("setupPropertyUserStore: Starting new PropertyUserStore. PropertiesFile: " + _filename + " refreshInterval: " + _refreshInterval); try { propertyUserStore.start(); } catch (Exception e) { LOG.warn("Exception while starting propertyUserStore: ",e); } } } }
/** * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart() */ protected void doStart() throws Exception { super.doStart(); if (_propertyUserStore == null) { if(LOG.isDebugEnabled()) LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: " + _config + " refreshInterval: " + _refreshInterval); _propertyUserStore = new PropertyUserStore(); _propertyUserStore.setRefreshInterval(_refreshInterval); _propertyUserStore.setConfig(_config); _propertyUserStore.registerUserListener(this); _propertyUserStore.start(); } }
/** * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart() */ protected void doStart() throws Exception { super.doStart(); if (_propertyUserStore == null) { if(LOG.isDebugEnabled()) LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: " + _config + " refreshInterval: " + _refreshInterval); _propertyUserStore = new PropertyUserStore(); _propertyUserStore.setRefreshInterval(_refreshInterval); _propertyUserStore.setConfig(_config); _propertyUserStore.registerUserListener(this); _propertyUserStore.start(); } }
/** * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart() */ @Override protected void doStart() throws Exception { super.doStart(); // can be null so we switch to previous behaviour using PropertyUserStore if (_userStore == null) { if(LOG.isDebugEnabled()) LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: " + _config + " hotReload: " + hotReload); PropertyUserStore propertyUserStore = new PropertyUserStore(); propertyUserStore.setHotReload(hotReload); propertyUserStore.setConfigPath(_config); propertyUserStore.start(); _userStore = propertyUserStore; _userStoreAutoCreate = true; } }
/** * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart() */ protected void doStart() throws Exception { super.doStart(); if (_propertyUserStore == null) { if(LOG.isDebugEnabled()) LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: " + _config + " refreshInterval: " + _refreshInterval); _propertyUserStore = new PropertyUserStore(); _propertyUserStore.setRefreshInterval(_refreshInterval); _propertyUserStore.setConfig(_config); _propertyUserStore.registerUserListener(this); _propertyUserStore.start(); } }
/** * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart() */ protected void doStart() throws Exception { super.doStart(); if (_propertyUserStore == null) { if(LOG.isDebugEnabled()) LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: " + _config + " refreshInterval: " + _refreshInterval); _propertyUserStore = new PropertyUserStore(); _propertyUserStore.setRefreshInterval(_refreshInterval); _propertyUserStore.setConfig(_config); _propertyUserStore.registerUserListener(this); _propertyUserStore.start(); } }
/** * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart() */ @Override protected void doStart() throws Exception { super.doStart(); if (_propertyUserStore == null) { if(LOG.isDebugEnabled()) LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: " + _config + " refreshInterval: " + _refreshInterval); _propertyUserStore = new PropertyUserStore(); _propertyUserStore.setRefreshInterval(_refreshInterval); _propertyUserStore.setConfig(_config); _propertyUserStore.registerUserListener(this); _propertyUserStore.start(); } }
/** * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart() */ protected void doStart() throws Exception { super.doStart(); if (_propertyUserStore == null) { if(LOG.isDebugEnabled()) LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: " + _config + " refreshInterval: " + _refreshInterval); _propertyUserStore = new PropertyUserStore(); _propertyUserStore.setRefreshInterval(_refreshInterval); _propertyUserStore.setConfig(_config); _propertyUserStore.registerUserListener(this); _propertyUserStore.start(); } }
/** * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart() */ protected void doStart() throws Exception { super.doStart(); if (_propertyUserStore == null) { if(LOG.isDebugEnabled()) LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: " + _config + " refreshInterval: " + _refreshInterval); _propertyUserStore = new PropertyUserStore(); _propertyUserStore.setRefreshInterval(_refreshInterval); _propertyUserStore.setConfig(_config); _propertyUserStore.registerUserListener(this); _propertyUserStore.start(); } }
/** * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart() */ @Override protected void doStart() throws Exception { super.doStart(); if (_propertyUserStore == null) { if(LOG.isDebugEnabled()) LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: " + _config + " hotReload: " + hotReload); _propertyUserStore = new PropertyUserStore(); _propertyUserStore.setHotReload(hotReload); _propertyUserStore.setConfigPath(_config); _propertyUserStore.registerUserListener(this); _propertyUserStore.start(); } }
/** Very simple! */ private static UserStore makeUserStore(String user, String password, String role) { Credential cred = new Password(password); PropertyUserStore propertyUserStore = new PropertyUserStore(); String[] roles = role == null ? null : new String[]{role}; propertyUserStore.addUser(user, cred, roles); try { propertyUserStore.start(); } catch (Exception ex) { throw new FusekiException("UserStore", ex); } return propertyUserStore; }