|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.discovery.impl.topology.connector.TopologyRequestValidator
public class TopologyRequestValidator
Request Validator helper.
Field Summary | |
---|---|
static String |
HASH_HEADER
|
static String |
SIG_HEADER
|
Constructor Summary | |
---|---|
TopologyRequestValidator(Config config)
Create a TopologyRequestValidator. |
Method Summary | |
---|---|
String |
decodeMessage(org.apache.commons.httpclient.HttpMethod method)
Decode a response from the server. |
String |
decodeMessage(javax.servlet.http.HttpServletRequest request)
Decode a message sent from the client. |
String |
encodeMessage(String body)
Encodes a request returning the encoded body |
boolean |
isTrusted(org.apache.commons.httpclient.HttpMethod method)
Is the response from the server to be trusted by the client. |
boolean |
isTrusted(javax.servlet.http.HttpServletRequest request)
Is the request from the client trusted, based on the signature headers. |
void |
trustMessage(org.apache.commons.httpclient.HttpMethod method,
String body)
Trust a message on the client before sending, only if trust is enabled. |
void |
trustMessage(javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpServletRequest request,
String body)
Trust a response message sent from the server to the client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SIG_HEADER
public static final String HASH_HEADER
Constructor Detail |
---|
public TopologyRequestValidator(Config config)
config
- the configuation objectMethod Detail |
---|
public String encodeMessage(String body) throws IOException
body
-
IOException
public String decodeMessage(javax.servlet.http.HttpServletRequest request) throws IOException
request
- the request object for the message.
IOException
- if there is a problem decoding the message or the
message is invalid.public String decodeMessage(org.apache.commons.httpclient.HttpMethod method) throws IOException
method
- the method that received the response.
IOException
- if there was a problem decoding the message.public boolean isTrusted(javax.servlet.http.HttpServletRequest request)
request
- the request.
public boolean isTrusted(org.apache.commons.httpclient.HttpMethod method)
method
- the client method.
public void trustMessage(org.apache.commons.httpclient.HttpMethod method, String body)
method
- the method which will have headers set after the call.body
- the body.public void trustMessage(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, String body)
response
- the response.request
- the request,body
- body of the response.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |