congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AuthenticatorUtils.computeDigestAuthentication
Code IndexAdd Tabnine to your IDE (free)

How to use
computeDigestAuthentication
method
in
org.asynchttpclient.util.AuthenticatorUtils

Best Java code snippets using org.asynchttpclient.util.AuthenticatorUtils.computeDigestAuthentication (Showing top 4 results out of 315)

origin: AsyncHttpClient/async-http-client

    .setMethodName(request.getMethod())
    .build();
authorizationHeader = computeDigestAuthentication(realm);
origin: AsyncHttpClient/async-http-client

public static String perRequestProxyAuthorizationHeader(Request request, Realm proxyRealm) {
 String proxyAuthorization = null;
 if (proxyRealm != null && proxyRealm.isUsePreemptiveAuth()) {
  switch (proxyRealm.getScheme()) {
   case BASIC:
    proxyAuthorization = computeBasicAuthentication(proxyRealm);
    break;
   case DIGEST:
    if (isNonEmpty(proxyRealm.getNonce())) {
     // update realm with request information
     proxyRealm = realm(proxyRealm)
         .setUri(request.getUri())
         .setMethodName(request.getMethod())
         .build();
     proxyAuthorization = computeDigestAuthentication(proxyRealm);
    }
    break;
   case NTLM:
   case KERBEROS:
   case SPNEGO:
    // NTLM, KERBEROS and SPNEGO are only set on the first request with a connection,
    // see perConnectionProxyAuthorizationHeader
    break;
   default:
    throw new IllegalStateException("Invalid Authentication scheme " + proxyRealm.getScheme());
  }
 }
 return proxyAuthorization;
}
origin: org.asynchttpclient/async-http-client-api

  public static String perRequestAuthorizationHeader(Request request, Realm realm) {

    String authorizationHeader = null;

    if (realm != null && realm.getUsePreemptiveAuth()) {

      switch (realm.getScheme()) {
      case BASIC:
        authorizationHeader = computeBasicAuthentication(realm);
        break;
      case DIGEST:
        if (isNonEmpty(realm.getNonce()))
          authorizationHeader = computeDigestAuthentication(realm);
        break;
      case NTLM:
      case KERBEROS:
      case SPNEGO:
        // NTLM, KERBEROS and SPNEGO are only set on the first request,
        // see firstRequestOnlyAuthorizationHeader
      case NONE:
        break;
      default:
        throw new IllegalStateException("Invalid Authentication " + realm);
      }
    }

    return authorizationHeader;
  }
}
origin: org.asynchttpclient/async-http-client-api

public static String perRequestProxyAuthorizationHeader(Request request, ProxyServer proxyServer, Realm realm, boolean connect) {
  String proxyAuthorization = null;
  if (!connect && proxyServer != null && proxyServer.getScheme() == AuthScheme.BASIC) {
    proxyAuthorization = computeBasicAuthentication(proxyServer);
  } else if (realm != null && realm.getUsePreemptiveAuth() && realm.isTargetProxy()) {
    switch (realm.getScheme()) {
    case BASIC:
      proxyAuthorization = computeBasicAuthentication(realm);
      break;
    case DIGEST:
      if (isNonEmpty(realm.getNonce()))
        proxyAuthorization = computeDigestAuthentication(realm);
      break;
    case NTLM:
    case KERBEROS:
    case SPNEGO:
      // NTLM, KERBEROS and SPNEGO are only set on the first request,
      // see firstRequestOnlyAuthorizationHeader
    case NONE:
      break;
    default:
      throw new IllegalStateException("Invalid Authentication " + realm);
    }
  }
  return proxyAuthorization;
}
org.asynchttpclient.utilAuthenticatorUtilscomputeDigestAuthentication

Popular methods of AuthenticatorUtils

  • perConnectionAuthorizationHeader
  • perConnectionProxyAuthorizationHeader
  • perRequestAuthorizationHeader
  • perRequestProxyAuthorizationHeader
  • append
  • computeBasicAuthentication
  • computeRealmURI
  • getHeaderWithPrefix
  • getProxyAuthorizationHeader

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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