@Test public void authenticatedWithoutUserInfo() throws Exception { StreamingHttpServiceFilter service = new BasicAuthHttpServiceFilter.Builder<>(CREDENTIALS_VERIFIER, REALM_VALUE) .buildServer() .create(HELLO_WORLD_SERVICE); StreamingHttpRequest request = reqRespFactory.get("/path"); request.headers().set(AUTHORIZATION, "Basic " + base64("userId:password")); StreamingHttpResponse response = awaitIndefinitelyNonNull(service.handle(CONN_CTX, request, reqRespFactory)); assertEquals(OK, response.status()); assertFalse(response.headers().contains(USER_ID_HEADER_NAME)); }
@Override public StreamingHttpServiceFilter create(final StreamingHttpService service) { return new BasicAuthStreamingHttpService<>(this, service); }
BasicAuthHttpServiceFilter implements StreamingHttpServiceFilterFactory, HttpExecutionStrategyInfluencer { @Override public StreamingHttpServiceFilter create(final StreamingHttpService service) { return new BasicAuthStreamingHttpService<>(this, service); } }
BasicAuthHttpServiceFilter implements StreamingHttpServiceFilterFactory, HttpExecutionStrategyInfluencer { @Override public StreamingHttpServiceFilter create(final StreamingHttpService service) { return new BasicAuthStreamingHttpService<>(this, service); } private  BasicAuthHttpServiceFilter(final CredentialsVerifier<UserInfo> credentialsVerifier,
                                       final String realm,
                                       final boolean proxy,
                                       @Nullable final Key<UserInfo> userInfoKey,
                                       final boolean utf8); }
BasicAuthHttpServiceFilter implements StreamingHttpServiceFilterFactory, HttpExecutionStrategyInfluencer { @Override public StreamingHttpServiceFilter create(final StreamingHttpService service) { return new BasicAuthStreamingHttpService<>(this, service); } private  BasicAuthHttpServiceFilter(final CredentialsVerifier<UserInfo> credentialsVerifier,
                                       final String realm,
                                       final boolean proxy,
                                       @Nullable final Key<UserInfo> userInfoKey,
                                       final boolean utf8); @Override StreamingHttpServiceFilter create(final StreamingHttpService service); @Override HttpExecutionStrategy influenceStrategy(final HttpExecutionStrategy strategy); }
BasicAuthHttpServiceFilter implements StreamingHttpServiceFilterFactory, HttpExecutionStrategyInfluencer { @Override public StreamingHttpServiceFilter create(final StreamingHttpService service) { return new BasicAuthStreamingHttpService<>(this, service); } private  BasicAuthHttpServiceFilter(final CredentialsVerifier<UserInfo> credentialsVerifier,
                                       final String realm,
                                       final boolean proxy,
                                       @Nullable final Key<UserInfo> userInfoKey,
                                       final boolean utf8); @Override StreamingHttpServiceFilter create(final StreamingHttpService service); @Override HttpExecutionStrategy influenceStrategy(final HttpExecutionStrategy strategy);  }