org.restlet.engine.http.security
Class HttpBasicHelper

java.lang.Object
  extended by org.restlet.engine.Helper
      extended by org.restlet.engine.security.AuthenticatorHelper
          extended by org.restlet.engine.http.security.HttpBasicHelper

public class HttpBasicHelper
extends AuthenticatorHelper

Implements the HTTP BASIC authentication.

Author:
Jerome Louvel

Constructor Summary
HttpBasicHelper()
          Constructor.
 
Method Summary
 void formatRawRequest(ChallengeWriter cw, ChallengeRequest challenge, Response response, Series<Parameter> httpHeaders)
          Formats a challenge request as raw credentials.
 void formatRawResponse(ChallengeWriter cw, ChallengeResponse challenge, Request request, Series<Parameter> httpHeaders)
          Formats a challenge response as raw credentials.
 void parseRequest(ChallengeRequest challenge, Response response, Series<Parameter> httpHeaders)
          Parses an authenticate header into a challenge request.
 void parseResponse(ChallengeResponse challenge, Request request, Series<Parameter> httpHeaders)
          Parses an authorization header into a challenge response.
 
Methods inherited from class org.restlet.engine.security.AuthenticatorHelper
authenticate, challenge, formatRequest, formatResponse, formatSecret, getChallengeScheme, getLogger, isClientSide, isServerSide, setChallengeScheme, setClientSide, setServerSide
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpBasicHelper

public HttpBasicHelper()
Constructor.

Method Detail

formatRawRequest

public void formatRawRequest(ChallengeWriter cw,
                             ChallengeRequest challenge,
                             Response response,
                             Series<Parameter> httpHeaders)
                      throws IOException
Description copied from class: AuthenticatorHelper
Formats a challenge request as raw credentials.

Overrides:
formatRawRequest in class AuthenticatorHelper
Parameters:
cw - The header writer to update.
challenge - The challenge request to format.
response - The parent response.
httpHeaders - The current request HTTP headers.
Throws:
IOException

formatRawResponse

public void formatRawResponse(ChallengeWriter cw,
                              ChallengeResponse challenge,
                              Request request,
                              Series<Parameter> httpHeaders)
Description copied from class: AuthenticatorHelper
Formats a challenge response as raw credentials.

Overrides:
formatRawResponse in class AuthenticatorHelper
Parameters:
cw - The header writer to update.
challenge - The challenge response to format.
request - The parent request.
httpHeaders - The current request HTTP headers.

parseRequest

public void parseRequest(ChallengeRequest challenge,
                         Response response,
                         Series<Parameter> httpHeaders)
Description copied from class: AuthenticatorHelper
Parses an authenticate header into a challenge request. The header is HeaderConstants.HEADER_WWW_AUTHENTICATE.

Overrides:
parseRequest in class AuthenticatorHelper
Parameters:
challenge - The challenge request to update.
response - The parent response.
httpHeaders - The current response HTTP headers.

parseResponse

public void parseResponse(ChallengeResponse challenge,
                          Request request,
                          Series<Parameter> httpHeaders)
Description copied from class: AuthenticatorHelper
Parses an authorization header into a challenge response. The header is HeaderConstants.HEADER_AUTHORIZATION.

Overrides:
parseResponse in class AuthenticatorHelper
Parameters:
challenge - The challenge response to update.
request - The parent request.
httpHeaders - The current request HTTP headers.


Copyright © 2005-2011 Noelios Technologies.