congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
WWWAuthenticationProtocolHandler
Code IndexAdd Tabnine to your IDE (free)

How to use
WWWAuthenticationProtocolHandler
in
org.eclipse.jetty.client

Best Java code snippets using org.eclipse.jetty.client.WWWAuthenticationProtocolHandler (Showing top 2 results out of 315)

origin: airlift/airlift

  @Override
  public Response.Listener getResponseListener()
  {
    return new ForwardingResponseListener(super.getResponseListener())
    {
      @Override
      public void onComplete(Result result)
      {
        HttpHeader header = getAuthenticateHeader();
        HttpFields headers = result.getResponse().getHeaders();
        // There is no need to check for a SPNEGO token because it can't exist here:
        // * SPNEGO token only exist if the client successfully authenticated
        // * This authenticate handler is not called when already authenticated
        if (headers.getValuesList(header).stream().anyMatch(NEGOTIATE::equalsIgnoreCase)) {
          headers.put(header, NEGOTIATE + " realm=\"dummy\"");
        }
        super.onComplete(result);
      }
    };
  }
}
origin: org.eclipse.jetty/jetty-client

@Override
protected void doStart() throws Exception
{
  if (executor == null)
  {
    QueuedThreadPool threadPool = new QueuedThreadPool();
    threadPool.setName(name);
    setExecutor(threadPool);
  }
  if (byteBufferPool == null)
    setByteBufferPool(new MappedByteBufferPool(2048,
        executor instanceof ThreadPool.SizedThreadPool
            ? ((ThreadPool.SizedThreadPool)executor).getMaxThreads() / 2
            : ProcessorUtils.availableProcessors() * 2));
  if (scheduler == null)
    setScheduler(new ScheduledExecutorScheduler(name + "-scheduler", false));
  if (resolver == null)
    setSocketAddressResolver(new SocketAddressResolver.Async(executor, scheduler, getAddressResolutionTimeout()));
  handlers.put(new ContinueProtocolHandler());
  handlers.put(new RedirectProtocolHandler(this));
  handlers.put(new WWWAuthenticationProtocolHandler(this));
  handlers.put(new ProxyAuthenticationProtocolHandler(this));
  decoderFactories.add(new GZIPContentDecoder.Factory(byteBufferPool));
  cookieManager = newCookieManager();
  cookieStore = cookieManager.getCookieStore();
  transport.setHttpClient(this);
  super.doStart();
}
org.eclipse.jetty.clientWWWAuthenticationProtocolHandler

Javadoc

A protocol handler that handles the 401 response code in association with the WWW-Authenticate header.

Most used methods

  • <init>
  • getResponseListener

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • String (java.lang)
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now