Interface HTTPTrustAssociationInterceptor
-
public interface HTTPTrustAssociationInterceptorTheHTTPTrustAssociationInterceptoris an interface for developing a HTTP custom trust association interceptor (TAI). A custom TAI that implements this interface should also extendcom.ibm.wsspi.security.tai.extension.BaseTrustAssociationInterceptorclass.The custom TAI must implement the following methods:
initializeto allocate any resources needed for the TAInegotiateValidateandEstablishProtocolTrustthat returnsTAIResultto indicate the status of the HTTP message being processedisTargetProtocolInterceptorthat returns false/true to indicate whether a HTTP message will be handled by the TAI.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcleanup()Invoked when the TAI should free any resources it holds.java.lang.StringgetType()Returns a type value of the TAI.java.lang.StringgetVersion()Returns the version number of the current TAI implementation.intinitialize(java.util.Properties properties)Initializes the trust association interceptor.booleanisTargetProtocolInterceptor(javax.servlet.http.HttpServletRequest req)The custom TAI should use this method to handle the http request.com.ibm.wsspi.security.tai.TAIResultnegotiateValidateandEstablishProtocolTrust(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)ReturnsTAIResultthat indicates the status of the message being processed.
-
-
-
Method Detail
-
isTargetProtocolInterceptor
boolean isTargetProtocolInterceptor(javax.servlet.http.HttpServletRequest req) throws com.ibm.websphere.security.WebTrustAssociationFailedExceptionThe custom TAI should use this method to handle the http request. If the method returns false, a request will be ignored by the TAI.- Parameters:
req- HttpServletRequest to be handled by the TAI- Returns:
- boolean true indicates that the message will be handled by the TAI, otherwise false
- Throws:
com.ibm.websphere.security.WebTrustAssociationFailedException- exception
-
negotiateValidateandEstablishProtocolTrust
com.ibm.wsspi.security.tai.TAIResult negotiateValidateandEstablishProtocolTrust(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws com.ibm.websphere.security.WebTrustAssociationFailedExceptionReturnsTAIResultthat indicates the status of the message being processed.If authentication succeeds, the TAIResult should contain the status HttpServletResponse.SC_OK and a principal.
If authentication fails, the TAIResult should contain a return code of HttpServletResponse.SC_UNAUTHORIZED (401), SC_FORBIDDEN (403), or SC_PROXY_AUTHENTICATION_REQUIRED (407).
- Parameters:
req- incoming SipServletRequest to be handled by the TAIresp- incoming SipServletResponse to be handled by the TAI- Returns:
- TAIResult result of trust association interceptor negotiation
- Throws:
com.ibm.websphere.security.WebTrustAssociationFailedException- exception
-
initialize
int initialize(java.util.Properties properties) throws com.ibm.websphere.security.WebTrustAssociationFailedExceptionInitializes the trust association interceptor.- Parameters:
properties- Properties defined in the TAI properties- Returns:
- int 0 indicates success, any other code indicates a failure
- Throws:
com.ibm.websphere.security.WebTrustAssociationFailedException- exception
-
getVersion
java.lang.String getVersion()
Returns the version number of the current TAI implementation.- Returns:
- String the version of the TAI
-
getType
java.lang.String getType()
Returns a type value of the TAI.- Returns:
- String the type of the TAI
-
cleanup
void cleanup()
Invoked when the TAI should free any resources it holds. For example, it could close a connection to a database.
-
-