Package org.apache.rampart.saml
Class SAML2AssertionHandler
java.lang.Object
org.apache.rampart.saml.SAMLAssertionHandler
org.apache.rampart.saml.SAML2AssertionHandler
This class handles SAML2 assertions.Processes SAML2 assertion and will extract SAML2 attributes
such as assertion id, start date, end date etc ...
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.axiom.om.OMElementGets the assertion element as an Axiom OMElement.byte[]getAssertionKeyInfoSecret(org.apache.wss4j.common.crypto.Crypto signatureCrypto, TokenCallbackHandler tokenCallbackHandler, org.apache.wss4j.dom.handler.RequestData requestData) Gets the secret in assertion.booleanChecks whether SAML assertion is bearer - urn:oasis:names:tc:SAML:2.0:cm:bearerprotected voidMethods inherited from class org.apache.rampart.saml.SAMLAssertionHandler
getAssertionId, getDateNotBefore, getDateNotOnOrAfter, setAssertionId, setDateNotBefore, setDateNotOnOrAfter
-
Constructor Details
-
SAML2AssertionHandler
public SAML2AssertionHandler(org.opensaml.saml.saml2.core.Assertion samlAssertion)
-
-
Method Details
-
isBearerAssertion
public boolean isBearerAssertion()Checks whether SAML assertion is bearer - urn:oasis:names:tc:SAML:2.0:cm:bearer- Specified by:
isBearerAssertionin classSAMLAssertionHandler- Returns:
- true if assertion is bearer else false.
-
processSAMLAssertion
protected void processSAMLAssertion()- Specified by:
processSAMLAssertionin classSAMLAssertionHandler
-
getAssertionKeyInfoSecret
public byte[] getAssertionKeyInfoSecret(org.apache.wss4j.common.crypto.Crypto signatureCrypto, TokenCallbackHandler tokenCallbackHandler, org.apache.wss4j.dom.handler.RequestData requestData) throws org.apache.wss4j.common.ext.WSSecurityException Description copied from class:SAMLAssertionHandlerGets the secret in assertion.- Specified by:
getAssertionKeyInfoSecretin classSAMLAssertionHandler- Parameters:
signatureCrypto- Signature crypto info, private,public keys.tokenCallbackHandler- The token callback class, required for WSS4J processingrequestData- Allow customization of the numerous optional WSS4J params- Returns:
- Secret as a byte array
- Throws:
org.apache.wss4j.common.ext.WSSecurityException- If an error occurred while validating the signature.
-
getAssertionElement
Description copied from class:SAMLAssertionHandlerGets the assertion element as an Axiom OMElement.- Specified by:
getAssertionElementin classSAMLAssertionHandler- Returns:
- OMElement representation of assertion.
- Throws:
TrustException- if an error occurred while converting Assertion to an OMElement.
-