Class InteractionManager
- java.lang.Object
-
- com.sun.identity.liberty.ws.interaction.InteractionManager
-
public class InteractionManager extends Object
This class provides the interface and implementation for supporting resource owner interaction.WSCandWSPwould collaborate with the singleton object instance of this class to provide and use resource owner interaction.
-
-
Field Summary
Fields Modifier and Type Field Description static StringIDPName of URL query parameter to be used byWSCto includeproviderIDofIDP, that was used to authenticate user.static StringINTERACTION_NAMESPACEName space URI of interaction servicestatic QNameQNAME_DO_NOT_INTERACTQNameforis:doNotInteractis- name space prefix for interaction servicestatic QNameQNAME_DO_NOT_INTERACT_FOR_DATAQNameforis:doNotInteractForDatais- name space prefix for interaction servicestatic QNameQNAME_INTERACT_IF_NEEDEDQNameforis:interactIfNeededis- name space prefix for interaction servicestatic QNameQNAME_INTERACTION_CAN_NOT_DETERMINE_REQUEST_HOSTQNameforis:interactIfNeededis- name space prefix for interaction servicestatic QNameQNAME_INTERACTION_REQUIREDQNameforis:interactionRequiredis- name space prefix for interaction servicestatic QNameQNAME_INTERACTION_REQUIRED_FOR_DATAQNameforis:forDatais- name space prefix for interaction servicestatic QNameQNAME_INTERACTION_TIME_NOT_SUFFICEINTQNameforis:timeNotSufficientis- name space prefix for interaction servicestatic QNameQNAME_INTERACTION_TIMED_OUTQNameforis:timeOutis- name space prefix for interaction servicestatic QNameQNAME_SERVERQNamefors:Servers- soap name space prefixstatic StringREQUEST_IDName of suggested URL query parameter to be used byWSCto include an ID to refer to request message that led to user agent redirect.static StringRESEND_MESSAGEName of URL query parameter to be used byWSPto include an ID to indicate that user agent is redirected back toWSCfromWSPstatic StringRETURN_TO_URLName of URL query parameter to be used byWSCto includereturnToURL, while redirecting user agent toWSP.static StringSERVER_ERRORConstant string to indicate generic server error
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static InteractionManagergetInstance()Gets singleton object instance ofInteractionManagercom.sun.identity.liberty.ws.interaction.jaxb.InteractionResponseElementgetInteractionResponseElement(Message requestMessage)Gets interaction response that was gathered from resource owner byInteractionManagerMessagehandleInteraction(Message requestMessage, com.sun.identity.liberty.ws.interaction.jaxb.InquiryElement inquiryElement)Deprecated.MessagehandleInteraction(Message requestMessage, com.sun.identity.liberty.ws.interaction.jaxb.InquiryElement inquiryElement, String language)Handles resource owner interactions on behalf ofWSP.MessageresendRequest(String returnToURL, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse)Resends a previously cached SOAP request message toWSP.MessageresendRequest(String returnToURL, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, Message requestMessage)Resends a SOAP request message toWSP.MessagesendRequest(Message requestMessage, String connectTo, String certAlias, String soapAction, String returnToURL, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse)Sends SOAP request toWSP.
-
-
-
Field Detail
-
RETURN_TO_URL
public static final String RETURN_TO_URL
Name of URL query parameter to be used byWSCto includereturnToURL, while redirecting user agent toWSP.- See Also:
- Constant Field Values
-
REQUEST_ID
public static final String REQUEST_ID
Name of suggested URL query parameter to be used byWSCto include an ID to refer to request message that led to user agent redirect.- See Also:
- Constant Field Values
-
IDP
public static final String IDP
Name of URL query parameter to be used byWSCto includeproviderIDofIDP, that was used to authenticate user.- See Also:
- Constant Field Values
-
RESEND_MESSAGE
public static final String RESEND_MESSAGE
Name of URL query parameter to be used byWSPto include an ID to indicate that user agent is redirected back toWSCfromWSP- See Also:
- Constant Field Values
-
INTERACTION_NAMESPACE
public static final String INTERACTION_NAMESPACE
Name space URI of interaction service- See Also:
- Constant Field Values
-
QNAME_SERVER
public static final QName QNAME_SERVER
QNamefors:Servers- soap name space prefix
-
QNAME_INTERACT_IF_NEEDED
public static final QName QNAME_INTERACT_IF_NEEDED
QNameforis:interactIfNeededis- name space prefix for interaction service
-
QNAME_DO_NOT_INTERACT
public static final QName QNAME_DO_NOT_INTERACT
QNameforis:doNotInteractis- name space prefix for interaction service
-
QNAME_DO_NOT_INTERACT_FOR_DATA
public static final QName QNAME_DO_NOT_INTERACT_FOR_DATA
QNameforis:doNotInteractForDatais- name space prefix for interaction service
-
QNAME_INTERACTION_REQUIRED
public static final QName QNAME_INTERACTION_REQUIRED
QNameforis:interactionRequiredis- name space prefix for interaction service
-
QNAME_INTERACTION_REQUIRED_FOR_DATA
public static final QName QNAME_INTERACTION_REQUIRED_FOR_DATA
QNameforis:forDatais- name space prefix for interaction service
-
QNAME_INTERACTION_TIME_NOT_SUFFICEINT
public static final QName QNAME_INTERACTION_TIME_NOT_SUFFICEINT
QNameforis:timeNotSufficientis- name space prefix for interaction service
-
QNAME_INTERACTION_TIMED_OUT
public static final QName QNAME_INTERACTION_TIMED_OUT
QNameforis:timeOutis- name space prefix for interaction service
-
QNAME_INTERACTION_CAN_NOT_DETERMINE_REQUEST_HOST
public static final QName QNAME_INTERACTION_CAN_NOT_DETERMINE_REQUEST_HOST
QNameforis:interactIfNeededis- name space prefix for interaction service
-
SERVER_ERROR
public static final String SERVER_ERROR
Constant string to indicate generic server error- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static InteractionManager getInstance()
Gets singleton object instance ofInteractionManager- Returns:
- singleton object instance of
InteractionManager
-
sendRequest
public Message sendRequest(Message requestMessage, String connectTo, String certAlias, String soapAction, String returnToURL, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) throws InteractionException, InteractionRedirectException, SOAPBindingException, SOAPFaultException
Sends SOAP request toWSP. This would be invoked atWSCside.- Parameters:
requestMessage- request message.connectTo- SOAP URL to which to send the SOAP requestcertAlias- SOAP Client Certificate AliassoapAction- SOAP Action AttributereturnToURL- URL to which to redirect user agent afterWSP- resource owner interactionshttpRequest- HTTP request object of current user agent requesthttpResponse- HTTP response object of current user agent request- Returns:
- response SOAP response message sent by
WSP. - Throws:
InteractionException- for generic interaction errorInteractionRedirectException- if user agent is redirected toWSPfor resource owner interactionsSOAPBindingException- for generic SOAP binding errorsSOAPFaultException- if the response message has SOAP fault
-
resendRequest
public Message resendRequest(String returnToURL, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) throws InteractionRedirectException, InteractionException, SOAPBindingException, SOAPFaultException
Resends a previously cached SOAP request message toWSP. This would be invoked atWSCside. Message ID for the cached message should be provided as value ofREQUEST_IDquery parameter inhttpRequest.- Parameters:
returnToURL- URL to which to redirect user agent afterWSP- resource owner interactionshttpRequest- HTTP request object of current user agent requesthttpResponse- HTTP response object of current user agent request- Returns:
- response SOAP message sent by
WSP. - Throws:
InteractionException- for generic interaction errorInteractionRedirectException- if user agent is redirected toWSPfor resource owner interactionsSOAPBindingException- if there are generic SOAP errorsSOAPFaultException- if the response message has SOAP fault- See Also:
REQUEST_ID
-
resendRequest
public Message resendRequest(String returnToURL, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, Message requestMessage) throws InteractionRedirectException, InteractionException, SOAPBindingException, SOAPFaultException
Resends a SOAP request message toWSP. This would be invoked atWSCside.- Parameters:
returnToURL- URL to which to redirect user agent afterWSP- resource owner interactionshttpRequest- HTTP request object of current user agent requesthttpResponse- HTTP response object of current user agent requestrequestMessage- SOAP message to be resent.- Returns:
- response SOAP message sent by
WSP. - Throws:
InteractionException- for generic interaction errorInteractionRedirectException- if user agent is redirected toWSPfor resource owner interactionsSOAPBindingException- for generic SOAP errorsSOAPFaultException- if the response message has SOAP fault
-
handleInteraction
public Message handleInteraction(Message requestMessage, com.sun.identity.liberty.ws.interaction.jaxb.InquiryElement inquiryElement) throws InteractionException, InteractionSOAPFaultException, SOAPFaultException
Deprecated.Handles resource owner interactions on behalf ofWSP. This is invoked atWSPside.- Parameters:
requestMessage- SOAP request that requires resource owner interactionsinquiryElement- query thatWSPwants to pose to resource owner.- Returns:
- SOAP message that contains
InteractionResponse, gathered byInteractionManager - Throws:
InteractionException- for generic interaction errorInteractionSOAPFaultException- if a SOAP fault has to be returned toWSCSOAPFaultException- if the response message has SOAP fault
-
handleInteraction
public Message handleInteraction(Message requestMessage, com.sun.identity.liberty.ws.interaction.jaxb.InquiryElement inquiryElement, String language) throws InteractionException, InteractionSOAPFaultException, SOAPFaultException
Handles resource owner interactions on behalf ofWSP. This is invoked atWSPside.- Parameters:
requestMessage- SOAP request that requires resource owner interactionsinquiryElement- query thatWSPwants to pose to resource ownerlanguage- language in which the query page needs to be rendered- Returns:
- SOAP message that contains
InteractionResponse, gathered byInteractionManager - Throws:
InteractionException- for generic interaction errorInteractionSOAPFaultException- if a SOAP fault has to be returned toWSCSOAPFaultException- if the response message has SOAP fault
-
getInteractionResponseElement
public com.sun.identity.liberty.ws.interaction.jaxb.InteractionResponseElement getInteractionResponseElement(Message requestMessage) throws InteractionException
Gets interaction response that was gathered from resource owner byInteractionManager- Parameters:
requestMessage- request message.- Returns:
- interaction response that was gathered by
InteractionManager. - Throws:
InteractionException- for interaction error
-
-