jain.protocol.ip.sip.header
Class ProxyAuthenticateHeader

java.lang.Object
  |
  +--jain.protocol.ip.sip.header.Header
        |
        +--jain.protocol.ip.sip.header.ResponseHeader
              |
              +--jain.protocol.ip.sip.header.ProxyAuthenticateHeader

public final class ProxyAuthenticateHeader
extends ResponseHeader

This class represents the Proxy-Authenticate response-header. A ProxyAuthenticateHeader must be included as part of a PROXY_AUTHENTICATION_REQUIRED ResponseMessage. The field value consists of a challenge that indicates the authentication scheme and parameters applicable to the proxy for this RequestURI.

Note - Unlike its usage within HTTP, the ProxyAuthenticateHeader must be passed upstream in the ResponseMessage to the UAC. In SIP, only UAC's can authenticate themselves to proxies.

A client should cache the credentials used for a particular proxy server and realm for the next RequestMessage to that server. Credentials are, in general, valid for a specific value of the RequestURI at a particular proxy server. If a client contacts a proxy server that has required authentication in the past, but the client does not have credentials for the particular RequestURI, it may attempt to use the most-recently used credential. The server responds with an UNAUTHORIZED ResponseMessage if the client guessed incorrectly.

This suggested caching behavior is motivated by proxies restricting phone calls to authenticated users. It seems likely that in most cases, all destinations require the same password. Note that end-to-end authentication is likely to be destination-specific.

Version:
0.6

Field Summary
static java.lang.String token
          Token of ProxyAuthenticateHeader
 
Fields inherited from class jain.protocol.ip.sip.header.Header
ENTITY_HEADER, GENERAL_HEADER, REQUEST_HEADER, RESPONSE_HEADER
 
Constructor Summary
ProxyAuthenticateHeader(Challenge challenge)
          Creates a ProxyAuthenticateHeader based on given challenge
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of ProxyAuthenticateHeader
 boolean equals(ProxyAuthenticateHeader proxyAuthenticateHeader)
          Indicates whether some other ProxyAuthenticateHeader is "equal to" this one
 Challenge getChallenge()
          Gets challenge of ProxyAuthenticateHeader
 java.lang.String getValue()
          Gets value of ProxyAuthenticateHeader
 void setChallenge(Challenge challenge)
          Set challenge of ProxyAuthenticateHeader
 
Methods inherited from class jain.protocol.ip.sip.header.Header
equals, getHeaderType, getToken, setValue, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

token

public static final java.lang.String token
Token of ProxyAuthenticateHeader
Constructor Detail

ProxyAuthenticateHeader

public ProxyAuthenticateHeader(Challenge challenge)
                        throws java.lang.IllegalArgumentException
Creates a ProxyAuthenticateHeader based on given challenge
Parameters:
challenge - challenge
Throws:
java.lang.IllegalArgumentException - if challenge is null
Method Detail

getChallenge

public Challenge getChallenge()
Gets challenge of ProxyAuthenticateHeader
Returns:
challenge of ProxyAuthenticateHeader

setChallenge

public void setChallenge(Challenge challenge)
                  throws java.lang.IllegalArgumentException
Set challenge of ProxyAuthenticateHeader
Parameters:
challenge - challenge
Throws:
java.lang.IllegalArgumentException - if challenge is null

getValue

public java.lang.String getValue()
Gets value of ProxyAuthenticateHeader
Overrides:
getValue in class Header
Returns:
value of ProxyAuthenticateHeader

clone

public java.lang.Object clone()
Creates and returns a copy of ProxyAuthenticateHeader
Overrides:
clone in class Header

equals

public boolean equals(ProxyAuthenticateHeader proxyAuthenticateHeader)
Indicates whether some other ProxyAuthenticateHeader is "equal to" this one
Parameters:
proxyAuthenticateHeader - the ProxyAuthenticateHeader with which to compare


If you have any comments or queries, please mail them to JAIN-SIP-interest@sun.com


Copyright - 2000 Sun Microsystems