|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.noelios.restlet.authentication.AuthenticationHelper
com.noelios.restlet.authentication.HttpDigestHelper
public class HttpDigestHelper
Implements the HTTP DIGEST authentication.
Constructor Summary | |
---|---|
HttpDigestHelper()
Constructor. |
Method Summary | |
---|---|
int |
authenticate(ChallengeResponse cr,
Request request,
Guard guard)
Indicates if the call is properly authenticated. |
void |
challenge(Response response,
boolean stale,
Guard guard)
Challenges the client by adding a challenge request to the response and by setting the status to CLIENT_ERROR_UNAUTHORIZED. |
void |
formatCredentials(java.lang.StringBuilder sb,
ChallengeResponse challenge,
Request request,
Series<Parameter> httpHeaders)
Formats a challenge response as raw credentials. |
void |
formatParameters(java.lang.StringBuilder sb,
Series<Parameter> parameters,
ChallengeRequest request)
Formats the parameters of a challenge request, to be appended to the scheme technical name and realm. |
void |
parseResponse(ChallengeResponse cr,
Request request)
Parses an authorization header into a challenge response. |
Methods inherited from class com.noelios.restlet.authentication.AuthenticationHelper |
---|
format, format, getChallengeScheme, getLogger, isClientSide, isServerSide, parseRequest, setChallengeScheme, setClientSide, setServerSide |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpDigestHelper()
Method Detail |
---|
public int authenticate(ChallengeResponse cr, Request request, Guard guard)
AuthenticationHelper
authenticate
in class AuthenticationHelper
cr
- The challenge response in the request.request
- The request to authenticate.guard
- The associated guard to callback.
Guard.checkSecret(Request, String, char[])
public void challenge(Response response, boolean stale, Guard guard)
AuthenticationHelper
challenge
in class AuthenticationHelper
response
- The response to update.stale
- Indicates if the new challenge is due to a stale response.guard
- The associated guard to callback.public void formatCredentials(java.lang.StringBuilder sb, ChallengeResponse challenge, Request request, Series<Parameter> httpHeaders)
AuthenticationHelper
formatCredentials
in class AuthenticationHelper
sb
- The String builder to update.challenge
- The challenge response to format.request
- The parent request.httpHeaders
- The current request HTTP headers.public void formatParameters(java.lang.StringBuilder sb, Series<Parameter> parameters, ChallengeRequest request)
AuthenticationHelper
formatParameters
in class AuthenticationHelper
sb
- The string builder to update.parameters
- The parameters to format.request
- The challenger request.public void parseResponse(ChallengeResponse cr, Request request)
AuthenticationHelper
parseResponse
in class AuthenticationHelper
request
- The request.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |