JAIN SIP API
v1.1 - 23rd June 2003

javax.sip.header
Interface WWWAuthenticateHeader

All Superinterfaces:
java.lang.Cloneable, Header, Parameters, java.io.Serializable
All Known Subinterfaces:
ProxyAuthenticateHeader

public interface WWWAuthenticateHeader
extends Parameters, Header

This interface represents the WWW-Authenticate response-header. A WWW-Authenticate header field value contains an authentication challenge. When a UAS receives a request from a UAC, the UAS MAY authenticate the originator before the request is processed. If no credentials (in the Authorization header field) are provided in the request, the UAS can challenge the originator to provide credentials by rejecting the request with a 401 (Unauthorized) status code. The WWW-Authenticate response-header field MUST be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the realm.

For Example:
WWW-Authenticate: Digest realm="atlanta.com", domain="sip:boxesbybob.com", qop="auth", nonce="f84f1cec41e6cbe5aea9c8e88d359", opaque="", stale=FALSE, algorithm=MD5

See Also:
Parameters

Field Summary
static java.lang.String NAME
          Name of WWWAuthenticateHeader
 
Method Summary
 java.lang.String getAlgorithm()
          Returns the Algorithm value of this WWWAuthenicateHeader.
 java.lang.String getDomain()
          Returns the Domain value of this WWWAuthenicateHeader.
 java.lang.String getNonce()
          Returns the Nonce value of this WWWAuthenicateHeader.
 java.lang.String getOpaque()
          Returns the Opaque value of this WWWAuthenicateHeader.
 java.lang.String getQop()
          Returns the Qop value of this WWWAuthenicateHeader.
 java.lang.String getRealm()
          Returns the Realm value of this WWWAuthenicateHeader.
 java.lang.String getScheme()
          Returns the scheme of the challenge information for this WWWAuthenticateHeader.
 URI getURI()
          Returns the URI value of this WWWAuthenicateHeader, for example DigestURI.
 boolean isStale()
          Returns the boolean value of the state paramater of this WWWAuthenicateHeader.
 void setAlgorithm(java.lang.String algorithm)
          Sets the Algorithm of the WWWAuthenicateHeader to the new algorithm parameter value.
 void setDomain(java.lang.String domain)
          Sets the Domain of the WWWAuthenicateHeader to the domain parameter value.
 void setNonce(java.lang.String nonce)
          Sets the Nonce of the WWWAuthenicateHeader to the nonce parameter value.
 void setOpaque(java.lang.String opaque)
          Sets the Opaque value of the WWWAuthenicateHeader to the new opaque parameter value.
 void setQop(java.lang.String qop)
          Sets the Qop value of the WWWAuthenicateHeader to the new qop parameter value.
 void setRealm(java.lang.String realm)
          Sets the Realm of the WWWAuthenicateHeader to the realm parameter value.
 void setScheme(java.lang.String scheme)
          Sets the scheme of the challenge information for this WWWAuthenticateHeader.
 void setStale(boolean stale)
          Sets the value of the stale parameter of the WWWAuthenicateHeader to the stale parameter value.
 void setURI(URI uri)
          Sets the URI of the WWWAuthenicateHeader to the uri parameter value.
 
Methods inherited from interface javax.sip.header.Parameters
getParameter, getParameterNames, removeParameter, setParameter
 
Methods inherited from interface javax.sip.header.Header
clone, equals, getName, toString
 

Field Detail

NAME

public static final java.lang.String NAME
Name of WWWAuthenticateHeader

See Also:
Constant Field Values
Method Detail

setScheme

public void setScheme(java.lang.String scheme)
Sets the scheme of the challenge information for this WWWAuthenticateHeader. For example, Digest.

Parameters:
scheme - - the new string value that identifies the challenge information scheme.
Since:
v1.1

getScheme

public java.lang.String getScheme()
Returns the scheme of the challenge information for this WWWAuthenticateHeader.

Returns:
the string value of the challenge information.
Since:
v1.1

setRealm

public void setRealm(java.lang.String realm)
              throws java.text.ParseException
Sets the Realm of the WWWAuthenicateHeader to the realm parameter value. Realm strings MUST be globally unique. It is RECOMMENDED that a realm string contain a hostname or domain name. Realm strings SHOULD present a human-readable identifier that can be rendered to a user.

Parameters:
realm - the new Realm String of this WWWAuthenicateHeader.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the realm.
Since:
v1.1

getRealm

public java.lang.String getRealm()
Returns the Realm value of this WWWAuthenicateHeader. This convenience method returns only the realm of the complete Challenge.

Returns:
the String representing the Realm information, null if value is not set.
Since:
v1.1

setNonce

public void setNonce(java.lang.String nonce)
              throws java.text.ParseException
Sets the Nonce of the WWWAuthenicateHeader to the nonce parameter value.

Parameters:
nonce - - the new nonce String of this WWWAuthenicateHeader.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the nonce value.
Since:
v1.1

getNonce

public java.lang.String getNonce()
Returns the Nonce value of this WWWAuthenicateHeader.

Returns:
the String representing the nonce information, null if value is not set.
Since:
v1.1

setURI

public void setURI(URI uri)
Sets the URI of the WWWAuthenicateHeader to the uri parameter value.

Parameters:
uri - - the new URI of this WWWAuthenicateHeader.
Since:
v1.1

getURI

public URI getURI()
Returns the URI value of this WWWAuthenicateHeader, for example DigestURI.

Returns:
the URI representing the URI information, null if value is not set.
Since:
v1.1

setAlgorithm

public void setAlgorithm(java.lang.String algorithm)
                  throws java.text.ParseException
Sets the Algorithm of the WWWAuthenicateHeader to the new algorithm parameter value.

Parameters:
algorithm - - the new algorithm String of this WWWAuthenicateHeader.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the algorithm value.
Since:
v1.1

getAlgorithm

public java.lang.String getAlgorithm()
Returns the Algorithm value of this WWWAuthenicateHeader.

Returns:
the String representing the Algorithm information, null if the value is not set.
Since:
v1.1

setQop

public void setQop(java.lang.String qop)
            throws java.text.ParseException
Sets the Qop value of the WWWAuthenicateHeader to the new qop parameter value.

Parameters:
qop - - the new Qop string of this WWWAuthenicateHeader.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the Qop value.
Since:
v1.1

getQop

public java.lang.String getQop()
Returns the Qop value of this WWWAuthenicateHeader.

Returns:
the string representing the Qop information, null if the value is not set.
Since:
v1.1

setOpaque

public void setOpaque(java.lang.String opaque)
               throws java.text.ParseException
Sets the Opaque value of the WWWAuthenicateHeader to the new opaque parameter value.

Parameters:
opaque - - the new Opaque string of this WWWAuthenicateHeader.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the opaque value.
Since:
v1.1

getOpaque

public java.lang.String getOpaque()
Returns the Opaque value of this WWWAuthenicateHeader.

Returns:
the String representing the Opaque information, null if the value is not set.
Since:
v1.1

setDomain

public void setDomain(java.lang.String domain)
               throws java.text.ParseException
Sets the Domain of the WWWAuthenicateHeader to the domain parameter value.

Parameters:
domain - - the new Domain string of this WWWAuthenicateHeader.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the domain.
Since:
v1.1

getDomain

public java.lang.String getDomain()
Returns the Domain value of this WWWAuthenicateHeader.

Returns:
the String representing the Domain information, null if value is not set.
Since:
v1.1

setStale

public void setStale(boolean stale)
Sets the value of the stale parameter of the WWWAuthenicateHeader to the stale parameter value.

Parameters:
stale - - the new boolean value of the stale parameter.
Since:
v1.1

isStale

public boolean isStale()
Returns the boolean value of the state paramater of this WWWAuthenicateHeader.

Returns:
the boolean representing if the challenge is stale.
Since:
v1.1

JAIN SIP API
v1.1 - 23rd June 2003

If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing to the
JAIN-SIP-Interest list at http://archives.java.sun.com
Copyright - 2003 Sun Microsystems