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

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • setScale (BigDecimal)
  • getContentResolver (Context)
  • Kernel (java.awt.image)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • 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