|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.engine.Helper
org.restlet.engine.security.AuthenticatorHelper
public abstract class AuthenticatorHelper
Base class for authentication helpers.
| Constructor Summary | |
|---|---|
AuthenticatorHelper(ChallengeScheme challengeScheme,
boolean clientSide,
boolean serverSide)
Constructor. |
|
| Method Summary | |
|---|---|
void |
formatRequest(ChallengeWriter cw,
ChallengeRequest challenge,
Response response,
Series<Header> httpHeaders)
Formats a challenge request as raw credentials. |
void |
formatResponse(ChallengeWriter cw,
ChallengeResponse challenge,
Request request,
Series<Header> httpHeaders)
Formats a challenge response as raw credentials. |
ChallengeScheme |
getChallengeScheme()
Returns the supported challenge scheme. |
Logger |
getLogger()
Returns the context's logger. |
boolean |
isClientSide()
Indicates if client side authentication is supported. |
boolean |
isServerSide()
Indicates if server side authentication is supported. |
void |
parseRequest(ChallengeRequest challenge,
Response response,
Series<Header> httpHeaders)
Parses an authenticate header into a challenge request. |
void |
parseResponse(ChallengeResponse challenge,
Request request,
Series<Header> httpHeaders)
Parses an authorization header into a challenge response. |
void |
setChallengeScheme(ChallengeScheme challengeScheme)
Sets the supported challenge scheme. |
void |
setClientSide(boolean clientSide)
Indicates if client side authentication is supported. |
void |
setServerSide(boolean serverSide)
Indicates if server side authentication is supported. |
Reference |
updateReference(Reference resourceRef,
ChallengeResponse challengeResponse,
Request request)
Optionally updates the request with a challenge response before sending it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AuthenticatorHelper(ChallengeScheme challengeScheme,
boolean clientSide,
boolean serverSide)
challengeScheme - The supported challenge scheme.clientSide - Indicates if client side authentication is supported.serverSide - Indicates if server side authentication is supported.| Method Detail |
|---|
public void formatRequest(ChallengeWriter cw,
ChallengeRequest challenge,
Response response,
Series<Header> httpHeaders)
throws IOException
cw - The header writer to update.challenge - The challenge request to format.response - The parent response.httpHeaders - The current request HTTP headers.
IOException
public void formatResponse(ChallengeWriter cw,
ChallengeResponse challenge,
Request request,
Series<Header> httpHeaders)
cw - The header writer to update.challenge - The challenge response to format.request - The parent request.httpHeaders - The current request HTTP headers.public ChallengeScheme getChallengeScheme()
public Logger getLogger()
public boolean isClientSide()
public boolean isServerSide()
public void parseRequest(ChallengeRequest challenge,
Response response,
Series<Header> httpHeaders)
HeaderConstants.HEADER_WWW_AUTHENTICATE.
challenge - The challenge request to update.response - The parent response.httpHeaders - The current response HTTP headers.
public void parseResponse(ChallengeResponse challenge,
Request request,
Series<Header> httpHeaders)
HeaderConstants.HEADER_AUTHORIZATION.
challenge - The challenge response to update.request - The parent request.httpHeaders - The current request HTTP headers.public void setChallengeScheme(ChallengeScheme challengeScheme)
challengeScheme - The supported challenge scheme.public void setClientSide(boolean clientSide)
clientSide - True if client side authentication is supported.public void setServerSide(boolean serverSide)
serverSide - True if server side authentication is supported.
public Reference updateReference(Reference resourceRef,
ChallengeResponse challengeResponse,
Request request)
resourceRef - The resource URI reference to update.challengeResponse - The challenge response provided.request - The request to update.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||