public class SAMLUtil
extends java.lang.Object
| Constructor and Description |
|---|
SAMLUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getAssertionId(org.w3c.dom.Element envelope,
java.lang.String elemName,
java.lang.String nmSpace) |
static java.security.cert.X509Certificate[] |
getCertificatesFromSAML(org.w3c.dom.Element elem)
Extracts the certificate(s) from the SAML token reference.
|
static java.util.Set |
getClaims(org.opensaml.SAMLAssertion assertion)
Extract the URIs of the set of claims available in a SAML 1.0/1.1 assertion.
|
static SAMLKeyInfo |
getSAMLKeyInfo(org.w3c.dom.Element elem,
Crypto crypto,
javax.security.auth.callback.CallbackHandler cb)
Extract certificates or the key available in the SAMLAssertion
|
static SAMLKeyInfo |
getSAMLKeyInfo(org.opensaml.SAMLAssertion assertion,
Crypto crypto,
javax.security.auth.callback.CallbackHandler cb) |
static Timestamp |
getTimestampForSAMLAssertion(org.w3c.dom.Element assertion)
Create a TimeStamp object from the SAML assertion.
|
static void |
validateSignature(org.opensaml.SAMLAssertion assertion,
Crypto sigCrypto)
Validate the signature of the SAML assertion
|
public static SAMLKeyInfo getSAMLKeyInfo(org.w3c.dom.Element elem, Crypto crypto, javax.security.auth.callback.CallbackHandler cb) throws WSSecurityException
elem - WSSecurityExceptionpublic static SAMLKeyInfo getSAMLKeyInfo(org.opensaml.SAMLAssertion assertion, Crypto crypto, javax.security.auth.callback.CallbackHandler cb) throws WSSecurityException
WSSecurityExceptionpublic static java.security.cert.X509Certificate[] getCertificatesFromSAML(org.w3c.dom.Element elem)
throws WSSecurityException
elem - The element containing the SAML token.WSSecurityExceptionpublic static java.lang.String getAssertionId(org.w3c.dom.Element envelope,
java.lang.String elemName,
java.lang.String nmSpace)
throws WSSecurityException
WSSecurityExceptionpublic static Timestamp getTimestampForSAMLAssertion(org.w3c.dom.Element assertion) throws WSSecurityException
assertion - WSSecurityExceptionpublic static java.util.Set getClaims(org.opensaml.SAMLAssertion assertion)
assertion - SAML 1.0/1.1 assertionpublic static void validateSignature(org.opensaml.SAMLAssertion assertion,
Crypto sigCrypto)
throws WSSecurityException
assertion - SAML 1.0/1.1 assertionsigCrypto - Crypto object containing the certificate of the token issuerWSSecurityException - if the token does not contain certificate information, the certificate
of the issuer is not trusted or the signature is invalid.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.