Package org.apache.wss4j.common.saml
Class SAMLUtil
- java.lang.Object
-
- org.apache.wss4j.common.saml.SAMLUtil
-
public final class SAMLUtil extends Object
Utility methods for SAML stuff
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddoSAMLCallback(CallbackHandler callbackHandler, SAMLCallback callback)static SAMLKeyInfogetCredentialFromKeyInfo(Element keyInfoElement, SAMLKeyInfoProcessor keyInfoProcessor, Crypto sigCrypto)This method returns a SAMLKeyInfo corresponding to the credential found in the KeyInfo (DOM Element) argument.static SAMLKeyInfogetCredentialFromSubject(SamlAssertionWrapper samlAssertion, SAMLKeyInfoProcessor keyInfoProcessor, Crypto sigCrypto)Parse a SAML Assertion to obtain a SAMLKeyInfo object from the Subject of the assertionstatic SAMLKeyInfogetCredentialFromSubject(org.opensaml.saml.saml1.core.Assertion assertion, SAMLKeyInfoProcessor keyInfoProcessor, Crypto sigCrypto)Get the SAMLKeyInfo object corresponding to the credential stored in the Subject of a SAML 1.1 assertionstatic SAMLKeyInfogetCredentialFromSubject(org.opensaml.saml.saml2.core.Assertion assertion, SAMLKeyInfoProcessor keyInfoProcessor, Crypto sigCrypto)Get the SAMLKeyInfo object corresponding to the credential stored in the Subject of a SAML 2 assertion
-
-
-
Method Detail
-
getCredentialFromSubject
public static SAMLKeyInfo getCredentialFromSubject(SamlAssertionWrapper samlAssertion, SAMLKeyInfoProcessor keyInfoProcessor, Crypto sigCrypto) throws WSSecurityException
Parse a SAML Assertion to obtain a SAMLKeyInfo object from the Subject of the assertion- Parameters:
samlAssertion- The SAML AssertionkeyInfoProcessor- A pluggable way to parse the KeyInfo- Returns:
- a SAMLKeyInfo object
- Throws:
WSSecurityException
-
getCredentialFromSubject
public static SAMLKeyInfo getCredentialFromSubject(org.opensaml.saml.saml1.core.Assertion assertion, SAMLKeyInfoProcessor keyInfoProcessor, Crypto sigCrypto) throws WSSecurityException
Get the SAMLKeyInfo object corresponding to the credential stored in the Subject of a SAML 1.1 assertion- Parameters:
assertion- The SAML 1.1 assertionkeyInfoProcessor- A pluggable way to parse the KeyInfosigCrypto- A Crypto instance- Returns:
- The SAMLKeyInfo object obtained from the Subject
- Throws:
WSSecurityException
-
getCredentialFromSubject
public static SAMLKeyInfo getCredentialFromSubject(org.opensaml.saml.saml2.core.Assertion assertion, SAMLKeyInfoProcessor keyInfoProcessor, Crypto sigCrypto) throws WSSecurityException
Get the SAMLKeyInfo object corresponding to the credential stored in the Subject of a SAML 2 assertion- Parameters:
assertion- The SAML 2 assertionkeyInfoProcessor- A pluggable way to parse the KeyInfosigCrypto- A Crypto instance- Returns:
- The SAMLKeyInfo object obtained from the Subject
- Throws:
WSSecurityException
-
getCredentialFromKeyInfo
public static SAMLKeyInfo getCredentialFromKeyInfo(Element keyInfoElement, SAMLKeyInfoProcessor keyInfoProcessor, Crypto sigCrypto) throws WSSecurityException
This method returns a SAMLKeyInfo corresponding to the credential found in the KeyInfo (DOM Element) argument.- Parameters:
keyInfoElement- The KeyInfo as a DOM ElementkeyInfoProcessor- A pluggable way to parse the KeyInfosigCrypto- A Crypto instance- Returns:
- The credential (as a SAMLKeyInfo object)
- Throws:
WSSecurityException
-
doSAMLCallback
public static void doSAMLCallback(CallbackHandler callbackHandler, SAMLCallback callback)
-
-