    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class org.w3c.www.http.HttpCredential

    java.lang.Object
       |
       +----org.w3c.www.http.BasicValue
               |
               +----org.w3c.www.http.HttpCredential

public class HttpCredential
extends BasicValue

This class has a hack to handle basic authentication. Basic authentication (amongst others) is broken in the HTTP spec, to handle the APIs more nicely, Jigsaw fakes a `cookie` auth param with the appropriate basic-credentials.

##

HttpCredential()
HttpCredential(boolean, String)

##

getAuthParameter(String)
  Get an authentication parameter.
getScheme()
  Get the authentication scheme identifier.
getValue()
  HeaderValue implemenntation - Get this header value.
parse()
  parse.
setAuthParameter(String, String)
  Set an authentication parameter.
setScheme(String)
  Set the authentication scheme.
updateByteValue()
  Update the RFC822 compatible header value for this object.

##

HttpCredential

     public HttpCredential(boolean isValid,
                           String scheme)

HttpCredential

     public HttpCredential()

##

parse

     protected void parse() throws HttpParserException

  parse.

  Throws: HttpParserException
    if parsing failed.
  Overrides:
    parse in class BasicValue

updateByteValue

     protected void updateByteValue()

  Update the RFC822 compatible header value for this object.

  Overrides:
    updateByteValue in class BasicValue

getValue

     public Object getValue()

  HeaderValue implemenntation - Get this header value.

  Overrides:
    getValue in class BasicValue

getScheme

     public String getScheme()

  Get the authentication scheme identifier.

  Returns:
    A String giving the auth scheme identifier.

setScheme

     public void setScheme(String scheme)

  Set the authentication scheme.

  Parameters:
    scheme - The auth scheme for these credentials.

getAuthParameter

     public String getAuthParameter(String name)

  Get an authentication parameter.

  Parameters:
    name - The name of the parameter to fetch.
  Returns:
    The String value, or null if undefined.

setAuthParameter

     public void setAuthParameter(String name,
                                  String value)

  Set an authentication parameter.

  Parameters:
    name - The name of the authentication parameter.
    value - The value of the authentication parameter.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index