Package org.restlet.data
Class ChallengeRequest
java.lang.Object
org.restlet.data.ChallengeMessage
org.restlet.data.ChallengeRequest
Authentication challenge sent by an origin server to a client. Upon reception
of this request, the client should send a new request with the proper
Note that when used with HTTP connectors, this class maps to the "WWW-Authenticate" header.
ChallengeResponse set.Note that when used with HTTP connectors, this class maps to the "WWW-Authenticate" header.
- Author:
- Jerome Louvel
-
Field Summary
Fields inherited from class org.restlet.data.ChallengeMessage
QUALITY_AUTHENTICATION, QUALITY_AUTHENTICATION_INTEGRITY -
Constructor Summary
ConstructorsConstructorDescriptionChallengeRequest(ChallengeScheme scheme) Constructor.ChallengeRequest(ChallengeScheme scheme, String realm) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the base URI references that collectively define the protected domains for the digest authentication.Returns the available options for quality of protection.inthashCode()booleanisStale()Indicates if the previous request from the client was stale.voidsetDomainRefs(List<Reference> domainRefs) Sets the URI references that define the protection domains for the digest authentication.voidsetDomainUris(Collection<String> domainUris) Sets the URI references that define the protection domains for the digest authentication.voidsetQualityOptions(List<String> qualityOptions) Sets the available options for quality of protection.voidsetStale(boolean stale) Indicates if the previous request from the client was stale.Methods inherited from class org.restlet.data.ChallengeMessage
getDigestAlgorithm, getOpaque, getParameters, getRawValue, getRealm, getScheme, getServerNonce, setDigestAlgorithm, setOpaque, setParameters, setRawValue, setRealm, setScheme, setServerNonce
-
Constructor Details
-
ChallengeRequest
Constructor.- Parameters:
scheme- The challenge scheme.
-
ChallengeRequest
Constructor.- Parameters:
scheme- The challenge scheme.realm- The authentication realm.
-
-
Method Details
-
equals
- Overrides:
equalsin classChallengeMessage
-
getDomainRefs
Returns the base URI references that collectively define the protected domains for the digest authentication. By default it return a list with a single "/" URI reference.- Returns:
- The base URI references.
-
getQualityOptions
Returns the available options for quality of protection. The default value isChallengeMessage.QUALITY_AUTHENTICATION.- Returns:
- The available options for quality of protection.
-
hashCode
public int hashCode()Description copied from class:ChallengeMessage- Overrides:
hashCodein classChallengeMessage
-
isStale
public boolean isStale()Indicates if the previous request from the client was stale.- Returns:
- True if the previous request from the client was stale.
-
setDomainRefs
Sets the URI references that define the protection domains for the digest authentication.- Parameters:
domainRefs- The base URI references.
-
setDomainUris
Sets the URI references that define the protection domains for the digest authentication. Note that the parameters are copied into a newCopyOnWriteArrayListinstance.- Parameters:
domainUris- The base URI references.- See Also:
-
setQualityOptions
Sets the available options for quality of protection. The default value isChallengeMessage.QUALITY_AUTHENTICATION.- Parameters:
qualityOptions- The available options for quality of protection.
-
setStale
public void setStale(boolean stale) Indicates if the previous request from the client was stale.- Parameters:
stale- True if the previous request from the client was stale.
-