Package org.restlet.client.data
Class AuthenticationInfo
- java.lang.Object
-
- org.restlet.client.data.AuthenticationInfo
-
public class AuthenticationInfo extends java.lang.ObjectPreemptive authentication information. Sent by an origin server to a client after a successful digest authentication attempt.
Note that when used with HTTP connectors, this class maps to the "Authentication-Info" header.- Author:
- Kelly McLaughlin, Jerome Louvel
- See Also:
- HTTP Authentication - The Authentication-Info Header
-
-
Constructor Summary
Constructors Constructor Description AuthenticationInfo(java.lang.String nextNonce, int nonceCount, java.lang.String cnonce, java.lang.String quality, java.lang.String responseDigest)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetClientNonce()Returns the client nonce.java.lang.StringgetNextServerNonce()Returns the next server nonce.intgetNonceCount()Returns the nonce-count value.java.lang.StringgetQuality()Returns the quality of protection.java.lang.StringgetResponseDigest()Returns the optional response digest for mutual authentication.inthashCode()voidsetClientNonce(java.lang.String clientNonce)Sets the client nonce.voidsetNextServerNonce(java.lang.String nextNonce)Sets the next server nonce.voidsetNonceCount(int nonceCount)Sets the nonce-count value.voidsetQuality(java.lang.String qop)Sets the quality of protection.voidsetResponseDigest(java.lang.String responseDigest)Sets the optional response digest for mutual authentication.
-
-
-
Constructor Detail
-
AuthenticationInfo
public AuthenticationInfo(java.lang.String nextNonce, int nonceCount, java.lang.String cnonce, java.lang.String quality, java.lang.String responseDigest)Constructor.- Parameters:
nextNonce- The next nonce value.nonceCount- The nonce-count value.cnonce- The cnonce value.quality- The quality of protection.responseDigest- The optional response digest for mutual authentication.
-
-
Method Detail
-
equals
public final boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getClientNonce
public java.lang.String getClientNonce()
Returns the client nonce.- Returns:
- The client nonce.
-
getNextServerNonce
public java.lang.String getNextServerNonce()
Returns the next server nonce. This is the nonce the server wishes the client to use for a future authentication response- Returns:
- The next nonce value.
-
getNonceCount
public int getNonceCount()
Returns the nonce-count value.- Returns:
- The nonce-count value.
-
getQuality
public java.lang.String getQuality()
Returns the quality of protection. The value can beChallengeMessage.QUALITY_AUTHENTICATIONfor authentication orChallengeMessage.QUALITY_AUTHENTICATION_INTEGRITYfor authentication with integrity protection.- Returns:
- The quality of protection.
-
getResponseDigest
public java.lang.String getResponseDigest()
Returns the optional response digest for mutual authentication. Note that when used with HTTP connectors, this property maps to the "response-digest" value in the "response-auth" directive of the "Authentication-Info" header.- Returns:
- The optional response digest for mutual authentication.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
setClientNonce
public void setClientNonce(java.lang.String clientNonce)
Sets the client nonce.- Parameters:
clientNonce- The client nonce.
-
setNextServerNonce
public void setNextServerNonce(java.lang.String nextNonce)
Sets the next server nonce. This is the nonce the server wishes the client to use for a future authentication response- Parameters:
nextNonce- The next nonce.
-
setNonceCount
public void setNonceCount(int nonceCount)
Sets the nonce-count value.- Parameters:
nonceCount- The nonceCount value.
-
setQuality
public void setQuality(java.lang.String qop)
Sets the quality of protection. The value can beChallengeMessage.QUALITY_AUTHENTICATIONfor authentication orChallengeMessage.QUALITY_AUTHENTICATION_INTEGRITYfor authentication with integrity protection.- Parameters:
qop- The quality of protection.
-
setResponseDigest
public void setResponseDigest(java.lang.String responseDigest)
Sets the optional response digest for mutual authentication. Note that when used with HTTP connectors, this property maps to the "response-digest" value in the "response-auth" directive of the "Authentication-Info" header.- Parameters:
responseDigest- The response digest.
-
-