Class OpenSAMLUtil


  • public final class OpenSAMLUtil
    extends Object
    Class OpenSAMLUtil provides static helper methods for the OpenSaml library
    • Method Detail

      • initSamlEngine

        public static void initSamlEngine()
        Initialise the SAML library
      • initSamlEngine

        public static void initSamlEngine​(boolean includeXacml)
      • getParserPool

        public static net.shibboleth.utilities.java.support.xml.ParserPool getParserPool()
        Get the configured ParserPool.
        Returns:
        the configured ParserPool
      • fromDom

        public static org.opensaml.core.xml.XMLObject fromDom​(Element root)
                                                       throws WSSecurityException
        Convert a SAML Assertion from a DOM Element to an XMLObject
        Parameters:
        root - of type Element
        Returns:
        XMLObject
        Throws:
        WSSecurityException
      • toDom

        public static Element toDom​(org.opensaml.core.xml.XMLObject xmlObject,
                                    Document doc)
                             throws WSSecurityException
        Convert a SAML Assertion from a XMLObject to a DOM Element
        Parameters:
        xmlObject - of type XMLObject
        doc - of type Document
        Returns:
        Element
        Throws:
        WSSecurityException
      • toDom

        public static Element toDom​(org.opensaml.core.xml.XMLObject xmlObject,
                                    Document doc,
                                    boolean signObject)
                             throws WSSecurityException
        Convert a SAML Assertion from a XMLObject to a DOM Element
        Parameters:
        xmlObject - of type XMLObject
        doc - of type Document
        signObject - whether to sign the XMLObject during marshalling
        Returns:
        Element
        Throws:
        WSSecurityException
      • buildSignature

        public static org.opensaml.xmlsec.signature.Signature buildSignature()
        Method buildSignature ...
        Returns:
        Signature
      • isMethodSenderVouches

        public static boolean isMethodSenderVouches​(String confirmMethod)
        Method isMethodSenderVouches ...
        Parameters:
        confirmMethod - of type String
        Returns:
        boolean
      • isMethodHolderOfKey

        public static boolean isMethodHolderOfKey​(String confirmMethod)
        Method isMethodHolderOfKey ...
        Parameters:
        confirmMethod - of type String
        Returns:
        boolean