Class RequestSecurityTokenResponse


  • public class RequestSecurityTokenResponse
    extends Object
    This class encapsulates the WS-Trust <RequestSecurityTokenResponse> element
    • Field Detail

      • valid

        protected boolean valid
      • recipient

        protected String recipient
      • validationDone

        protected boolean validationDone
      • appliesTo

        protected String appliesTo
      • issuer

        protected String issuer
    • Constructor Detail

      • RequestSecurityTokenResponse

        public RequestSecurityTokenResponse​(RequestedSecurityToken token,
                                            String appliesTo)
        Creates a new instance of RequestSecurityTokenResponse (RSTR).
        Parameters:
        token - the <RequestedSecurityToken> for the RSTR
        appliesTo - the consumer of the RSTR
      • RequestSecurityTokenResponse

        public RequestSecurityTokenResponse​(RequestedSecurityToken token)
        Creates a new instance of RequestSecurityTokenResponse (RSTR).
        Parameters:
        token - the <RequestedSecurityToken> for the RSTR
      • RequestSecurityTokenResponse

        public RequestSecurityTokenResponse​(Element root)
                                     throws WSFederationException
        Creates a new instance of RequestSecurityTokenResponse (RSTR) from a DOM Element
        Parameters:
        root - <RequestedSecurityToken> element
        Throws:
        WSFederationException - if an error occurs.
    • Method Detail

      • parseXML

        public static RequestSecurityTokenResponse parseXML​(String xml)
                                                     throws WSFederationException
        Returns RequestSecurityTokenResponse object based on the XML document received from server. This method is used primarily at the client side. The schema of the XML document is defined in WS-Trust.
        Parameters:
        xml - The RequestSecurityTokenResponse XML document String.
        Returns:
        RequestSecurityTokenResponse object based on the XML document received from server.
        Throws:
        WSFederationException - if XML parsing failed
      • parseXML

        public static RequestSecurityTokenResponse parseXML​(InputStream is)
                                                     throws WSFederationException
        Returns RequestSecurityTokenResponse object based on the data in the input stream. This method is used primarily at the client side. The schema of the XML document is defined in WS-Trust.
        Parameters:
        is - an InputStream
        Returns:
        RequestSecurityTokenResponse object based on the XML document received from server.
        Throws:
        WSFederationException - if XML parsing failed
      • getRequestedSecurityToken

        public RequestedSecurityToken getRequestedSecurityToken()
        This method returns the component RequestedSecurityToken
        Returns:
        The RequestedSecurityToken contained in the RSTR.
      • getAppliesTo

        public String getAppliesTo()
        This method returns the intended consumer of the RSTR
        Returns:
        The intended consumer of the RSTR.
      • toString

        public String toString()
        This method marshalls the RSTR, returning a String comprising the textual XML representation.
        Overrides:
        toString in class Object
        Returns:
        The textual XML representation of the RSTR.