Class HttpBasicHelper


  • public class HttpBasicHelper
    extends AuthenticatorHelper
    Implements the HTTP BASIC authentication.
    Author:
    Jerome Louvel
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpBasicHelper()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void formatRequest​(ChallengeWriter cw, org.restlet.data.ChallengeRequest challenge, org.restlet.Response response, org.restlet.util.Series<org.restlet.data.Header> httpHeaders)
      Formats a challenge request as raw credentials.
      void formatResponse​(ChallengeWriter cw, org.restlet.data.ChallengeResponse challenge, org.restlet.Request request, org.restlet.util.Series<org.restlet.data.Header> httpHeaders)
      Formats a challenge response as raw credentials.
      void parseRequest​(org.restlet.data.ChallengeRequest challenge, org.restlet.Response response, org.restlet.util.Series<org.restlet.data.Header> httpHeaders)
      Parses an authenticate header into a challenge request.
      void parseResponse​(org.restlet.data.ChallengeResponse challenge, org.restlet.Request request, org.restlet.util.Series<org.restlet.data.Header> httpHeaders)
      Parses an authorization header into a challenge response.
      • 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

      • formatRequest

        public void formatRequest​(ChallengeWriter cw,
                                  org.restlet.data.ChallengeRequest challenge,
                                  org.restlet.Response response,
                                  org.restlet.util.Series<org.restlet.data.Header> httpHeaders)
                           throws java.io.IOException
        Description copied from class: AuthenticatorHelper
        Formats a challenge request as raw credentials.
        Overrides:
        formatRequest 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:
        java.io.IOException
      • formatResponse

        public void formatResponse​(ChallengeWriter cw,
                                   org.restlet.data.ChallengeResponse challenge,
                                   org.restlet.Request request,
                                   org.restlet.util.Series<org.restlet.data.Header> httpHeaders)
        Description copied from class: AuthenticatorHelper
        Formats a challenge response as raw credentials.
        Overrides:
        formatResponse 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​(org.restlet.data.ChallengeRequest challenge,
                                 org.restlet.Response response,
                                 org.restlet.util.Series<org.restlet.data.Header> 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​(org.restlet.data.ChallengeResponse challenge,
                                  org.restlet.Request request,
                                  org.restlet.util.Series<org.restlet.data.Header> 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.