private static void initializeServer(Injector injector, String waveDomain) throws PersistenceException, WaveServerException { AccountStore accountStore = injector.getInstance(AccountStore.class); accountStore.initializeAccountStore(); AccountStoreHolder.init(accountStore, waveDomain); // Initialize the SignerInfoStore. CertPathStore certPathStore = injector.getInstance(CertPathStore.class); if (certPathStore instanceof SignerInfoStore) { ((SignerInfoStore)certPathStore).initializeSignerInfoStore(); } // Initialize the server. WaveletProvider waveServer = injector.getInstance(WaveletProvider.class); waveServer.initialize(); }
@Override protected void tearDown() throws Exception { AccountStoreHolder.resetForTesting(); }
@Override public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) { Preconditions.checkNotNull(callbackHandler, "Callback handler null"); accountStore = AccountStoreHolder.getAccountStore(); status = Status.NOT; this.subject = subject; this.callbackHandler = callbackHandler; }
address = address + ParticipantId.DOMAIN_PREFIX + AccountStoreHolder.getDefaultDomain();
@Override protected void setUp() throws Exception { MockitoAnnotations.initMocks(this); AccountStore store = new MemoryStore(); HumanAccountData account = new HumanAccountDataImpl(USER, new PasswordDigest("password".toCharArray())); store.putAccount(account); Config config = ConfigFactory.parseMap(ImmutableMap.<String, Object>of( "administration.disable_registration", false, "administration.analytics_account", "UA-someid", "security.enable_clientauth", false, "security.clientauth_cert_domain", "", "administration.disable_loginpage", false) ); servlet = new AuthenticationServlet(store, AuthTestUtil.makeConfiguration(), manager, "examPLe.com", config); AccountStoreHolder.init(store, "eXaMple.com"); when(session.getId()).thenReturn(""); }
@Override protected void tearDown() throws Exception { AccountStoreHolder.resetForTesting(); }
@Override protected void setUp() throws Exception { MockitoAnnotations.initMocks(this); AccountStore store = new MemoryStore(); HumanAccountData account = new HumanAccountDataImpl(USER, new PasswordDigest("password".toCharArray())); store.putAccount(account); Config config = ConfigFactory.parseMap(ImmutableMap.<String, Object>of( "administration.disable_registration", false, "administration.analytics_account", "UA-someid", "security.enable_clientauth", false, "security.clientauth_cert_domain", "", "administration.disable_loginpage", false) ); servlet = new AuthenticationServlet(store, AuthTestUtil.makeConfiguration(), manager, "examPLe.com", config, welcomeBot); AccountStoreHolder.init(store, "eXaMple.com"); }
@Override protected void tearDown() { AccountStoreHolder.resetForTesting(); }
@Override protected void setUp() throws Exception { AccountStore store = new MemoryStore(); store.putAccount(new HumanAccountDataImpl( ParticipantId.ofUnsafe("haspwd@example.com"), new PasswordDigest("pwd".toCharArray()))); store.putAccount(new HumanAccountDataImpl(ParticipantId.ofUnsafe("nopwd@example.com"))); AccountStoreHolder.init(store, "example.com"); }
@Override protected void tearDown() { AccountStoreHolder.resetForTesting(); }
@Override protected void setUp() throws Exception { AccountStore store = new MemoryStore(); store.putAccount(new HumanAccountDataImpl( ParticipantId.ofUnsafe("haspwd@example.com"), new PasswordDigest("pwd".toCharArray()))); store.putAccount(new HumanAccountDataImpl(ParticipantId.ofUnsafe("nopwd@example.com"))); AccountStoreHolder.init(store, "example.com"); }