org.opensaml.ws.security.provider
public class HTTPRule extends Object implements SecurityPolicyRule
Modifier and Type | Field and Description |
---|---|
private 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 and Description |
---|
HTTPRule(String type,
String method,
boolean secured)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
private final Logger log
private String requiredContentType
private String requiredRequestMethod
private boolean requireSecured
public void evaluate(MessageContext messageContext) throws SecurityPolicyException
evaluate
in interface SecurityPolicyRule
messageContext
- the message context being evaluatedSecurityPolicyException
- thrown if the message context does not meet the requirements of the rule,
or if there is a non-recoverable error during evaluationprotected void doEvaluate(MessageContext messageContext) throws SecurityPolicyException
HTTPTransport
, meets all
requirements.messageContext
- message context being evaluatedSecurityPolicyException
- thrown if the message context does not meet the requirements of an evaluated ruleprotected void evaluateContentType(HTTPTransport transport) throws SecurityPolicyException
transport
- transport being evalautedSecurityPolicyException
- thrown if the content type was an unexpected valueprotected void evaluateRequestMethod(HTTPTransport transport) throws SecurityPolicyException
transport
- transport being evalautedSecurityPolicyException
- thrown if the request method was an unexpected valueprotected void evaluateSecured(HTTPTransport transport) throws SecurityPolicyException
transport
- transport being evalautedSecurityPolicyException
- thrown if the transport is not secure and was required to beCopyright © 1999-2013 JBoss by Red Hat. All Rights Reserved.