Package org.apache.rampart.saml
Class SAMLAssertionHandler
java.lang.Object
org.apache.rampart.saml.SAMLAssertionHandler
- Direct Known Subclasses:
SAML1AssertionHandler,SAML2AssertionHandler
A class to handle attributes to common SAML1 and SAML2 assertions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.apache.axiom.om.OMElementGets the assertion element as an Axiom OMElement.abstract byte[]getAssertionKeyInfoSecret(org.apache.wss4j.common.crypto.Crypto signatureCrypto, TokenCallbackHandler tokenCallbackHandler, org.apache.wss4j.dom.handler.RequestData requestData) Gets the secret in assertion.abstract booleanChecks whether SAML assertion is bearer - urn:oasis:names:tc:SAML:2.0:cm:bearerprotected abstract voidprotected voidsetAssertionId(String assertionId) protected voidsetDateNotBefore(Instant dateNotBefore) protected voidsetDateNotOnOrAfter(Instant dateNotOnOrAfter)
-
Constructor Details
-
SAMLAssertionHandler
public SAMLAssertionHandler()
-
-
Method Details
-
getAssertionId
-
setAssertionId
-
getDateNotBefore
-
setDateNotBefore
-
getDateNotOnOrAfter
-
setDateNotOnOrAfter
-
isBearerAssertion
public abstract boolean isBearerAssertion()Checks whether SAML assertion is bearer - urn:oasis:names:tc:SAML:2.0:cm:bearer- Returns:
- true if assertion is bearer else false.
-
processSAMLAssertion
protected abstract void processSAMLAssertion() -
getAssertionKeyInfoSecret
public abstract 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 Gets the secret in assertion.- 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
Gets the assertion element as an Axiom OMElement.- Returns:
- OMElement representation of assertion.
- Throws:
TrustException- if an error occurred while converting Assertion to an OMElement.
-