org.apache.ws.security.saml
Class SAML2Util
java.lang.Object
org.apache.ws.security.saml.SAML2Util
public class SAML2Util
- extends Object
|
Field Summary |
static boolean |
bootstrapped
Extract certificates or the key available in the SAMLAssertion |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bootstrapped
public static boolean bootstrapped
- Extract certificates or the key available in the SAMLAssertion
SAML2Util
public SAML2Util()
doBootstrap
public static void doBootstrap()
throws WSSecurityException
- Throws:
WSSecurityException
getSAML2KeyInfo
public static SAML2KeyInfo getSAML2KeyInfo(Element elem,
Crypto crypto,
CallbackHandler cb)
throws WSSecurityException
- Throws:
WSSecurityException
getSAML2KeyInfo
public static SAML2KeyInfo getSAML2KeyInfo(org.opensaml.saml2.core.Assertion assertion,
Crypto crypto,
CallbackHandler cb)
throws WSSecurityException
- Throws:
WSSecurityException
getTimestampForSAMLAssertion
public static Timestamp getTimestampForSAMLAssertion(org.opensaml.saml2.core.Assertion assertion)
throws WSSecurityException
- Create a timestamp object from the SAML 2.0 Assertion
- Parameters:
assertion -
- Returns:
-
- Throws:
WSSecurityException
getClaims
public static Set getClaims(org.opensaml.saml2.core.Assertion assertion)
- Extract the URIs of the set of claims available in a SAML 1.0/1.1 assertion. This method will
iterate through the set of AttributeStatements available and extract the namespaces of the claim.
- Parameters:
assertion - SAML 2.0 Assertion
- Returns:
- TreeSet of claims contained in the SAML 2.0 assertion
validateSignature
public static void validateSignature(org.opensaml.saml2.core.Assertion assertion,
Crypto crypto)
throws WSSecurityException
- Validate the signature of the SAML assertion
- Parameters:
assertion - SAML 2.0 assertioncrypto - Crypto object containing the certificate of the token issuer
- Throws:
WSSecurityException - if the token does not contain certificate information, the certificate
of the issuer is not trusted or the signature is invalid.
Copyright © 2004-2015 The Apache Software Foundation. All Rights Reserved.