Class SecurityTokenReference


  • public class SecurityTokenReference
    extends Object
    This class represents the SecurityTokenReference for referencing the web services tokens that are used for message level security in the SOAP header.
    • Constructor Detail

      • SecurityTokenReference

        public SecurityTokenReference()
      • SecurityTokenReference

        public SecurityTokenReference​(Element element)
                               throws SecurityException
        Constructor
        Parameters:
        element - the security token reference.
        Throws:
        SecurityException - if the token parsing fails.
    • Method Detail

      • getReferenceType

        public String getReferenceType()
        Returns the reference type
        Returns:
        the reference type.
      • setReferenceType

        public void setReferenceType​(String referenceType)
        Sets the reference type.
        Parameters:
        referenceType - the reference type.
      • getReference

        public Reference getReference()
        Returns the Reference.
        Returns:
        the Reference.
      • setReference

        public void setReference​(Reference reference)
        Sets the Reference
        Parameters:
        reference - the reference element.
      • setKeyIdentifier

        public void setKeyIdentifier​(KeyIdentifier keyIdentifier)
        Sets the key identifier.
        Parameters:
        keyIdentifier - the key identifier.
      • getKeyIdentifier

        public KeyIdentifier getKeyIdentifier()
        Returns the key identifier
        Returns:
        the key identifier
      • getId

        public String getId()
        Returns the security token reference id.
        Returns:
        the security token reference id.
      • setId

        public void setId​(String id)
        Sets the security token reference id.
        Parameters:
        id - the security token reference id.
      • getX509IssuerSerial

        public org.apache.xml.security.keys.content.X509Data getX509IssuerSerial()
        Returns the X509data.
        Returns:
        the X509Data.
      • setX509IssuerSerial

        public void setX509IssuerSerial​(org.apache.xml.security.keys.content.X509Data x509Data)
        Sets the X509Data.
        Parameters:
        x509Data - the X509 data.
      • getTokenElement

        public Element getTokenElement​(Document doc)
                                throws SecurityException
        Returns the referenced security token via the Reference URI.
        Returns:
        the security token that is referenece via the reference URI.
        Throws:
        SecurityException
      • addToParent

        public void addToParent​(Element parent)
                         throws SecurityException
        Adds the securitytoken reference to the parent element.
        Parameters:
        parent - the parent node that securitytoken reference needs to be added.
        Throws:
        SecurityException - if there is a failure.