Class TAIResult
- java.lang.Object
-
- com.ibm.wsspi.security.tai.TAIResult
-
public final class TAIResult extends java.lang.ObjectThis is the result returned from
com.ibm.wsspi.security.tai.TrustAssociationInterceptor.negotiateValidateandEstablishTrustmethod. It contains the result of trust association interceptor negotiation, validation and establishing trust. If the trust is validated and established, then status code with valueHttpServletResponse.SC_OKand the authenticated principal must be set in theTAIResult. The JAAS Subject is optionally, this is only used if trust association interceptor wants to pass additional security information to WebSphere Application Server security runtime (please security attribute propagation documentation for details).Please see
com.ibm.wsspi.security.tai.TrustAssociationInterceptorfor details on the status code returned.- See Also:
Subject,TrustAssociationInterceptor
-
-
Constructor Summary
Constructors Constructor Description TAIResult(int status, java.lang.String principal, javax.security.auth.Subject subject)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TAIResultcreate(int status)Create an instance of the result with status code other thanHttpServletResponse.SC_OK.static TAIResultcreate(int status, java.lang.String principal)Create an instance of the result with status, if trust is validated and established (should return statusHttpServletResponse.SC_OK, if any other status code is return, WebSphere Application Server will stop the normal processing and send status code back to caller.) and the authenticated principal.static TAIResultcreate(int status, java.lang.String principal, javax.security.auth.Subject subject)Create an instance of the result with status, if trust is validated and established (should return statusHttpServletResponse.SC_OK, if any other status code is return, WebSphere Application Server will stop the normal processing and send status code back to caller.), the authenticated principal and JAAS Subject contains additional security information from third party security service.java.lang.StringgetAuthenticatedPrincipal()If trust is validated and established and status isHttpServletResponse.SC_OK, then this method return the authenticated principal.intgetStatus()If trust is validated and established, thenHttpServletResponse.SC_OKshould be returned.javax.security.auth.SubjectgetSubject()If trust is validated and established and status isHttpServletResponse.SC_OK, then this return the JAAS Subject that contains the other security information that can be used to create the WebSphere Application Server credential.
-
-
-
Method Detail
-
create
public static TAIResult create(int status, java.lang.String principal, javax.security.auth.Subject subject) throws com.ibm.websphere.security.WebTrustAssociationFailedException
Create an instance of the result with status, if trust is validated and established (should return status
HttpServletResponse.SC_OK, if any other status code is return, WebSphere Application Server will stop the normal processing and send status code back to caller.), the authenticated principal and JAAS Subject contains additional security information from third party security service.- Parameters:
status- status code, please useHttpServletResponse.SC_OKif trust is validated and establishedprincipal- authenticated principalsubject- JAAS Subject contains additional security information- Returns:
- TAIResult
- Throws:
com.ibm.websphere.security.WebTrustAssociationFailedException- Thrown if there is no authenticated principal when status isHttpServletResponse.SC_OK- See Also:
Subject
-
create
public static TAIResult create(int status, java.lang.String principal) throws com.ibm.websphere.security.WebTrustAssociationFailedException
Create an instance of the result with status, if trust is validated and established (should return status
HttpServletResponse.SC_OK, if any other status code is return, WebSphere Application Server will stop the normal processing and send status code back to caller.) and the authenticated principal.- Parameters:
status- status code, please useHttpServletResponse.SC_OKif trust is validated and establishedprincipal- authenticated principal- Returns:
- TAIResult
- Throws:
com.ibm.websphere.security.WebTrustAssociationFailedException- Thrown if there is no authenticated principal when status isHttpServletResponse.SC_OK
-
create
public static TAIResult create(int status) throws com.ibm.websphere.security.WebTrustAssociationFailedException
Create an instance of the result with status code other than
HttpServletResponse.SC_OK. This is for failure case.- Parameters:
status- status code other thanHttpServletResponse.SC_OK, for negotiation, or failure- Returns:
- TAIResult
- Throws:
com.ibm.websphere.security.WebTrustAssociationFailedException
-
getStatus
public final int getStatus()
If trust is validated and established, then
HttpServletResponse.SC_OKshould be returned. If any other status code is return, WebSphere Application Server will stop the normal processing and send status code back to caller.- Returns:
- The status of the trust association interceptor processing.
-
getAuthenticatedPrincipal
public final java.lang.String getAuthenticatedPrincipal()
If trust is validated and established and status is
HttpServletResponse.SC_OK, then this method return the authenticated principal.- Returns:
- The authenticated principal.
-
getSubject
public final javax.security.auth.Subject getSubject()
If trust is validated and established and status is
HttpServletResponse.SC_OK, then this return the JAAS Subject that contains the other security information that can be used to create the WebSphere Application Server credential. Please refer to the security token propagation documentation for details.This is optional and
nullcould be return if there is no additional security information.- Returns:
- The JAAS Subject contains additional security information.
nullcould be returned. - See Also:
Subject
-
-