|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensaml.ws.security.provider.HTTPRule
public class HTTPRule
A security rule that checks basic HTTP connection properties.
| Field Summary | |
|---|---|
private org.slf4j.Logger |
log
Class logger. |
private String |
requiredContentType
Expected content type of the request. |
private String |
requiredRequestMethod
Expected method of the request. |
private boolean |
requireSecured
Whether the request must be secure. |
| Constructor Summary | |
|---|---|
HTTPRule(String type,
String method,
boolean secured)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
doEvaluate(MessageContext messageContext)
Evaluates if the message context transport, guaranteed to be of type HTTPTransport, meets all
requirements. |
void |
evaluate(MessageContext messageContext)
Evaluates the message context against the rule. |
protected void |
evaluateContentType(HTTPTransport transport)
Checks if the transport is of the correct content type. |
protected void |
evaluateRequestMethod(HTTPTransport transport)
Checks if the transport is of the correct request method. |
protected void |
evaluateSecured(HTTPTransport transport)
Checks if the transport is secured. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final org.slf4j.Logger log
private String requiredContentType
private String requiredRequestMethod
private boolean requireSecured
| Constructor Detail |
|---|
public HTTPRule(String type,
String method,
boolean secured)
type - expected content typemethod - expected request methodsecured - whether the request must be secured| Method Detail |
|---|
public void evaluate(MessageContext messageContext)
throws SecurityPolicyException
evaluate in interface SecurityPolicyRulemessageContext - the message context being evaluated
SecurityPolicyException - thrown if the message context does not meet the requirements of the rule,
or if there is a non-recoverable error during evaluation
protected void doEvaluate(MessageContext messageContext)
throws SecurityPolicyException
HTTPTransport, meets all
requirements.
messageContext - message context being evaluated
SecurityPolicyException - thrown if the message context does not meet the requirements of an evaluated rule
protected void evaluateContentType(HTTPTransport transport)
throws SecurityPolicyException
transport - transport being evalauted
SecurityPolicyException - thrown if the content type was an unexpected value
protected void evaluateRequestMethod(HTTPTransport transport)
throws SecurityPolicyException
transport - transport being evalauted
SecurityPolicyException - thrown if the request method was an unexpected value
protected void evaluateSecured(HTTPTransport transport)
throws SecurityPolicyException
transport - transport being evalauted
SecurityPolicyException - thrown if the transport is not secure and was required to be
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||