Package org.apache.wss4j.common.saml
Class OpenSAMLUtil
- java.lang.Object
-
- org.apache.wss4j.common.saml.OpenSAMLUtil
-
public final class OpenSAMLUtil extends Object
Class OpenSAMLUtil provides static helper methods for the OpenSaml library
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.opensaml.xmlsec.signature.Signature
buildSignature()
Method buildSignature ...static org.opensaml.core.xml.XMLObject
fromDom(Element root)
Convert a SAML Assertion from a DOM Element to an XMLObjectstatic net.shibboleth.utilities.java.support.xml.ParserPool
getParserPool()
Get the configured ParserPool.static void
initSamlEngine()
Initialise the SAML librarystatic void
initSamlEngine(boolean includeXacml)
static boolean
isMethodHolderOfKey(String confirmMethod)
Method isMethodHolderOfKey ...static boolean
isMethodSenderVouches(String confirmMethod)
Method isMethodSenderVouches ...static Element
toDom(org.opensaml.core.xml.XMLObject xmlObject, Document doc)
Convert a SAML Assertion from a XMLObject to a DOM Elementstatic Element
toDom(org.opensaml.core.xml.XMLObject xmlObject, Document doc, boolean signObject)
Convert a SAML Assertion from a XMLObject to a DOM Element
-
-
-
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 XMLObjectdoc
- 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 XMLObjectdoc
- of type DocumentsignObject
- 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
-
-