@Test(timeout = 1000) public void testIsAuthenticatedAnonymousProfile(final TestContext testContext) { profiles.put(CLIENT1, AnonymousProfile.INSTANCE); final Async async = testContext.async(); profileManager.isAuthenticated() .thenAccept(b -> executionContext.runOnContext(() -> { assertThat(b, is(false)); async.complete(); })); }
public CompletableFuture<Boolean> isAuthenticated() { return getAll(true).thenApply(l -> { try { return IS_AUTHENTICATED_AUTHORIZER.isAuthorized(null, l); } catch (HttpAction httpAction) { throw new TechnicalException(httpAction); } }); }
AsyncProfileManager { public CompletableFuture<Boolean> isAuthenticated() { return getAll(true).thenApply(l -> { try { return IS_AUTHENTICATED_AUTHORIZER.isAuthorized(null, l); } catch (HttpAction httpAction) { throw new TechnicalException(httpAction); } }); } }
AsyncProfileManager { public CompletableFuture<Boolean> isAuthenticated() { return getAll(true).thenApply(l -> { try { return IS_AUTHENTICATED_AUTHORIZER.isAuthorized(null, l); } catch (HttpAction httpAction) { throw new TechnicalException(httpAction); } }); } AsyncProfileManager(final C context); }
AsyncProfileManager { public CompletableFuture<Boolean> isAuthenticated() { return getAll(true).thenApply(l -> { try { return IS_AUTHENTICATED_AUTHORIZER.isAuthorized(null, l); } catch (HttpAction httpAction) { throw new TechnicalException(httpAction); } }); } AsyncProfileManager(final C context); CompletableFuture<Optional<U>> get(final boolean readFromSession); CompletableFuture<List<U>> getAll(final boolean readFromSession); CompletableFuture<Void> remove(final boolean removeFromSession); CompletableFuture<Void> save(final boolean saveInSession, final U profile, final boolean multiProfile); CompletableFuture<Void> logout(); CompletableFuture<Boolean> isAuthenticated(); }
AsyncProfileManager { public CompletableFuture<Boolean> isAuthenticated() { return getAll(true).thenApply(l -> { try { return IS_AUTHENTICATED_AUTHORIZER.isAuthorized(null, l); } catch (HttpAction httpAction) { throw new TechnicalException(httpAction); } }); } AsyncProfileManager(final C context); CompletableFuture<Optional<U>> get(final boolean readFromSession); CompletableFuture<List<U>> getAll(final boolean readFromSession); CompletableFuture<Void> remove(final boolean removeFromSession); CompletableFuture<Void> save(final boolean saveInSession, final U profile, final boolean multiProfile); CompletableFuture<Void> logout(); CompletableFuture<Boolean> isAuthenticated();  }