Class WwwAuthInfo
- java.lang.Object
-
- org.sblim.cimclient.internal.http.AuthorizationInfo
-
- org.sblim.cimclient.internal.http.WwwAuthInfo
-
public class WwwAuthInfo extends AuthorizationInfo
Implements HTTP basic and digest authentication
-
-
Constructor Summary
Constructors Constructor Description WwwAuthInfo()Default ctor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetHeaderFieldName()Gets the HTTP header field name for this authentication informationbooleanisKeptAlive()Determines if the connection is kept alive after the "401 Unauthorized" responsebooleanisSentOnFirstRequest()Determines if the authorization information is already sent on the very first http request or after the "401 Unauthorized" responsestatic java.lang.String[]split(java.lang.String pLine)Splits a comma-separated string into multiple substringsjava.lang.StringtoString()voidupdateAuthenticationInfo(Challenge challenge, java.lang.String authenticate, java.net.URI url, java.lang.String requestMethod)Updates the authorization information according to a received challenge.-
Methods inherited from class org.sblim.cimclient.internal.http.AuthorizationInfo
createAuthorizationInfo, createAuthorizationInfo, getA1, getAddr, getAlgorithm, getCnonce, getCredentials, getNc, getNonce, getOpaque, getPort, getProtocol, getQop, getRealm, getResponse, getScheme, getURI, init, match, setA1, setAlgorithm, setCnonce, setCredentials, setNc, setNonce, setOpaque, setQop, setRealm, setResponse, setScheme, setURI
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Specified by:
toStringin classAuthorizationInfo
-
split
public static java.lang.String[] split(java.lang.String pLine)
Splits a comma-separated string into multiple substrings- Parameters:
pLine- The comma-separated string- Returns:
- The array of substrings (excluding commas)
-
updateAuthenticationInfo
public void updateAuthenticationInfo(Challenge challenge, java.lang.String authenticate, java.net.URI url, java.lang.String requestMethod) throws java.security.NoSuchAlgorithmException
Description copied from class:AuthorizationInfoUpdates the authorization information according to a received challenge.- Specified by:
updateAuthenticationInfoin classAuthorizationInfo- Parameters:
authenticate-challenge- The received challengeurl- The url of the CIM serverrequestMethod- The HTTP request method (POST or MPOST)- Throws:
java.security.NoSuchAlgorithmException
-
getHeaderFieldName
public java.lang.String getHeaderFieldName()
Description copied from class:AuthorizationInfoGets the HTTP header field name for this authentication information- Specified by:
getHeaderFieldNamein classAuthorizationInfo- Returns:
- The field name
-
isSentOnFirstRequest
public boolean isSentOnFirstRequest()
Description copied from class:AuthorizationInfoDetermines if the authorization information is already sent on the very first http request or after the "401 Unauthorized" response- Specified by:
isSentOnFirstRequestin classAuthorizationInfo- Returns:
trueorfalse
-
isKeptAlive
public boolean isKeptAlive()
Description copied from class:AuthorizationInfoDetermines if the connection is kept alive after the "401 Unauthorized" response- Specified by:
isKeptAlivein classAuthorizationInfo- Returns:
trueorfalse
-
-