public final class TAIResult
extends java.lang.Object
This is the result returned from
com.ibm.wsspi.security.tai.TrustAssociationInterceptor.negotiateValidateandEstablishTrust
method. It contains
the result of trust association interceptor negotiation, validation and establishing trust. If the trust is validated and
established, then status code with value HttpServletResponse.SC_OK
and the authenticated principal must be
set in the TAIResult
. 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.TrustAssociationInterceptor
for details on the status code returned.
Subject
,
TrustAssociationInterceptor
Constructor and Description |
---|
TAIResult(int status,
java.lang.String principal,
javax.security.auth.Subject subject) |
Modifier and Type | Method and Description |
---|---|
static TAIResult |
create(int status)
Create an instance of the result with status code other than
HttpServletResponse.SC_OK . |
static TAIResult |
create(int status,
java.lang.String principal)
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. |
static TAIResult |
create(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 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. |
java.lang.String |
getAuthenticatedPrincipal()
If trust is validated and established and status is
HttpServletResponse.SC_OK , then this
method return the authenticated principal. |
int |
getStatus()
If trust is validated and established, then
HttpServletResponse.SC_OK should be returned. |
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. |
public TAIResult(int status, java.lang.String principal, javax.security.auth.Subject subject) throws com.ibm.websphere.security.WebTrustAssociationFailedException
com.ibm.websphere.security.WebTrustAssociationFailedException
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.
status
- status code, please use HttpServletResponse.SC_OK
if trust is validated and establishedprincipal
- authenticated principalsubject
- JAAS Subject contains additional security informationcom.ibm.websphere.security.WebTrustAssociationFailedException
- Thrown if there is no authenticated principal when status is HttpServletResponse.SC_OK
Subject
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.
status
- status code, please use HttpServletResponse.SC_OK
if trust is validated and establishedprincipal
- authenticated principalcom.ibm.websphere.security.WebTrustAssociationFailedException
- Thrown if there is no authenticated principal when status is HttpServletResponse.SC_OK
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.
status
- status code other than HttpServletResponse.SC_OK
, for negotiation, or failurecom.ibm.websphere.security.WebTrustAssociationFailedException
public final int getStatus()
If trust is validated and established, then HttpServletResponse.SC_OK
should be returned.
If any other status code is return, WebSphere Application Server will stop the normal processing and
send status code back to caller.
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.
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 null
could be return if there is no additional security information.
null
could be returned.Subject