Package org.restlet.engine.security
Class HttpBasicHelper
java.lang.Object
org.restlet.engine.Helper
org.restlet.engine.security.AuthenticatorHelper
org.restlet.engine.security.HttpBasicHelper
Implements the HTTP BASIC authentication.
- Author:
- Jerome Louvel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidformatRequest(ChallengeWriter cw, ChallengeRequest challenge, Response response, Series<Header> httpHeaders) Formats a challenge request as raw credentials.voidformatResponse(ChallengeWriter cw, ChallengeResponse challenge, Request request, Series<Header> httpHeaders) Formats a challenge response as raw credentials.voidparseRequest(ChallengeRequest challenge, Response response, Series<Header> httpHeaders) Parses an authenticate header into a challenge request.voidparseResponse(ChallengeResponse challenge, Request request, Series<Header> httpHeaders) Parses an authorization header into a challenge response.Methods inherited from class org.restlet.engine.security.AuthenticatorHelper
getChallengeScheme, getLogger, isClientSide, isServerSide, setChallengeScheme, setClientSide, setServerSide, updateReference
-
Constructor Details
-
HttpBasicHelper
public HttpBasicHelper()Constructor.
-
-
Method Details
-
formatRequest
public void formatRequest(ChallengeWriter cw, ChallengeRequest challenge, Response response, Series<Header> httpHeaders) throws IOException Description copied from class:AuthenticatorHelperFormats a challenge request as raw credentials.- Overrides:
formatRequestin classAuthenticatorHelper- 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
-
formatResponse
public void formatResponse(ChallengeWriter cw, ChallengeResponse challenge, Request request, Series<Header> httpHeaders) Description copied from class:AuthenticatorHelperFormats a challenge response as raw credentials.- Overrides:
formatResponsein classAuthenticatorHelper- Parameters:
cw- The header writer to update.challenge- The challenge response to format.request- The parent request.httpHeaders- The current request HTTP headers.
-
parseRequest
Description copied from class:AuthenticatorHelperParses an authenticate header into a challenge request. The header isHeaderConstants.HEADER_WWW_AUTHENTICATE.- Overrides:
parseRequestin classAuthenticatorHelper- Parameters:
challenge- The challenge request to update.response- The parent response.httpHeaders- The current response HTTP headers.
-
parseResponse
Description copied from class:AuthenticatorHelperParses an authorization header into a challenge response. The header isHeaderConstants.HEADER_AUTHORIZATION.- Overrides:
parseResponsein classAuthenticatorHelper- Parameters:
challenge- The challenge response to update.request- The parent request.httpHeaders- The current request HTTP headers.
-