Package org.asynchttpclient.util
Class AuthenticatorUtils
- java.lang.Object
-
- org.asynchttpclient.util.AuthenticatorUtils
-
public final class AuthenticatorUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcomputeBodyHash(Request request, Realm realm)static StringcomputeRealmURI(Uri uri, boolean useAbsoluteURI, boolean omitQuery)static StringcomputeRspAuth(Realm realm)RFC 7616 Section 3.5: Compute rspauth value for mutual authentication.static @Nullable StringgetHeaderWithPrefix(@Nullable List<String> authenticateHeaders, String prefix)static @Nullable StringperConnectionAuthorizationHeader(Request request, @Nullable ProxyServer proxyServer, @Nullable Realm realm)static @Nullable StringperConnectionProxyAuthorizationHeader(Request request, @Nullable Realm proxyRealm)static @Nullable StringperRequestAuthorizationHeader(Request request, @Nullable Realm realm)static @Nullable StringperRequestProxyAuthorizationHeader(Request request, @Nullable Realm proxyRealm)static @Nullable StringselectBestDigestChallenge(@Nullable List<String> authenticateHeaders)RFC 7616 Section 4: Select the best Digest challenge from the list.
-
-
-
Field Detail
-
NEGOTIATE
public static final String NEGOTIATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getHeaderWithPrefix
@Nullable public static @Nullable String getHeaderWithPrefix(@Nullable @Nullable List<String> authenticateHeaders, String prefix)
-
selectBestDigestChallenge
@Nullable public static @Nullable String selectBestDigestChallenge(@Nullable @Nullable List<String> authenticateHeaders)
RFC 7616 Section 4: Select the best Digest challenge from the list. Iterates in server preference order and returns the first challenge whose algorithm is supported.
-
computeRealmURI
public static String computeRealmURI(Uri uri, boolean useAbsoluteURI, boolean omitQuery)
-
computeRspAuth
public static String computeRspAuth(Realm realm)
RFC 7616 Section 3.5: Compute rspauth value for mutual authentication. rspauth = H(HA1 : nonce : nc : cnonce : qop : H(":" uri)) Note: HA2' for rspauth uses empty method prefix.
-
perConnectionProxyAuthorizationHeader
@Nullable public static @Nullable String perConnectionProxyAuthorizationHeader(Request request, @Nullable @Nullable Realm proxyRealm)
-
perRequestProxyAuthorizationHeader
@Nullable public static @Nullable String perRequestProxyAuthorizationHeader(Request request, @Nullable @Nullable Realm proxyRealm)
-
perConnectionAuthorizationHeader
@Nullable public static @Nullable String perConnectionAuthorizationHeader(Request request, @Nullable @Nullable ProxyServer proxyServer, @Nullable @Nullable Realm realm)
-
-