Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.w3c.www.http
Class 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.

Fields inherited from class org.w3c.www.http.BasicValue
`isValid, raw, rlen, roff`

Constructor Summary
`HttpCredential()`
`HttpCredential(boolean isValid, java.lang.String scheme)`

Method Summary
`java.lang.String` | `getAuthParameter(java.lang.String name)` Get an authentication parameter.
`java.lang.String` | `getScheme()` Get the authentication scheme identifier.
`java.lang.Object` | `getValue()` HeaderValue implemenntation - Get this header value.
`protected void` | `parse()` parse.
`void` | `setAuthParameter(java.lang.String name, java.lang.String value)` Set an auth parameter value.
`void` | `setAuthParameter(java.lang.String name, java.lang.String value, boolean quoted)` Set an auth parameter value.
`void` | `setScheme(java.lang.String scheme)` Set the authentication scheme.
`protected void` | `updateByteValue()` Update the RFC822 compatible header value for this object.

Methods inherited from class org.w3c.www.http.BasicValue
`addBytes, appendValue, checkByteValue, emit, error, invalidateByteValue, setBytes, setString, toExternalForm, toString, validate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### HttpCredential

    public HttpCredential(boolean isValid,
                          java.lang.String scheme)

### HttpCredential

    public HttpCredential()

Method Detail

### parse

    protected void parse()
                  throws HttpParserException

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

### updateByteValue

    protected void updateByteValue()

  Description copied from class: BasicValue
  Update the RFC822 compatible header value for this object.
  Overrides:
    updateByteValue in class BasicValue

### getValue

    public java.lang.Object getValue()

  Description copied from class: BasicValue
  HeaderValue implemenntation - Get this header value.
  Overrides:
    getValue in class BasicValue
  Tags copied from class: BasicValue
  Returns:
    An object representing the parsed value for this header.

### getScheme

    public java.lang.String getScheme()

  Get the authentication scheme identifier.
  Returns:
    A String giving the auth scheme identifier.

### setScheme

    public void setScheme(java.lang.String scheme)

  Set the authentication scheme.
  Parameters:
    `scheme` - The auth scheme for these credentials.

### getAuthParameter

    public java.lang.String getAuthParameter(java.lang.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(java.lang.String name,
                                 java.lang.String value,
                                 boolean quoted)

  Set an auth parameter value.
  Parameters:
    `name` - The name of the parameter to set.
    `value` - The new value for this parameter.
    `quoted` - If true, the value will be quoted

### setAuthParameter

    public void setAuthParameter(java.lang.String name,
                                 java.lang.String value)

  Set an auth parameter value.
  Parameters:
    `name` - The name of the parameter to set.
    `value` - The new value for this parameter. The value will be quoted

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD