org.opensaml.ws.security.provider
Class HTTPRuleFactory

java.lang.Object
  extended by org.opensaml.ws.security.provider.HTTPRuleFactory
All Implemented Interfaces:
SecurityPolicyRuleFactory<javax.servlet.http.HttpServletRequest>

public class HTTPRuleFactory
extends java.lang.Object
implements SecurityPolicyRuleFactory<javax.servlet.http.HttpServletRequest>

A factory for a rule that checks that certain HTTP request characterisitics are met. Specifically the following items are tested:

Any option that is not set is not evaluated. No Issuer is determined or authenticated by this rule.


Nested Class Summary
protected  class HTTPRuleFactory.HTTPRule
          Policy rule for checking basic HTTP request requirements.
 
Constructor Summary
HTTPRuleFactory()
           
 
Method Summary
 SecurityPolicyRule<javax.servlet.http.HttpServletRequest> createRuleInstance()
          Creates an instance of a policy rule.
 java.lang.String getCharacterEncoding()
          Gets the expected content type of the request.
 java.lang.String getContentType()
          Gets the expected content type of the request.
 java.lang.String getRequestMethod()
          Gets the expected method of the request.
 java.lang.String getRequestScheme()
          Gets the expected scheme of the request.
 boolean isRequireSecured()
          Gets whether a secure request is required.
 void setCharacterEncoding(java.lang.String encoding)
          Sets the expected content type of the request.
 void setContentType(java.lang.String type)
          Sets the expected content type of the request.
 void setRequestMethod(java.lang.String method)
          Sets expected method of the request.
 void setRequestScheme(java.lang.String scheme)
          Sets the expected scheme of the request.
 void setRequireSecured(boolean secured)
          Sets whether a secure request is required.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPRuleFactory

public HTTPRuleFactory()
Method Detail

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Gets the expected content type of the request.

Returns:
expected content type of the request

setCharacterEncoding

public void setCharacterEncoding(java.lang.String encoding)
Sets the expected content type of the request.

Parameters:
encoding - expected content type of the request

getContentType

public java.lang.String getContentType()
Gets the expected content type of the request.

Returns:
expected content type of the request

setContentType

public void setContentType(java.lang.String type)
Sets the expected content type of the request.

Parameters:
type - expected content type of the request

getRequestMethod

public java.lang.String getRequestMethod()
Gets the expected method of the request.

Returns:
expected method of the request

setRequestMethod

public void setRequestMethod(java.lang.String method)
Sets expected method of the request.

Parameters:
method - expected method of the request

getRequestScheme

public java.lang.String getRequestScheme()
Gets the expected scheme of the request.

Returns:
expected scheme of the request

setRequestScheme

public void setRequestScheme(java.lang.String scheme)
Sets the expected scheme of the request.

Parameters:
scheme - expected scheme of the request

isRequireSecured

public boolean isRequireSecured()
Gets whether a secure request is required.

Returns:
whether a secure request is required

setRequireSecured

public void setRequireSecured(boolean secured)
Sets whether a secure request is required.

Parameters:
secured - whether a secure request is required

createRuleInstance

public SecurityPolicyRule<javax.servlet.http.HttpServletRequest> createRuleInstance()
Creates an instance of a policy rule.

Specified by:
createRuleInstance in interface SecurityPolicyRuleFactory<javax.servlet.http.HttpServletRequest>
Returns:
an instance of a policy rule