org.apache.rampart.saml
Class SAML2AssertionHandler

java.lang.Object
  extended by org.apache.rampart.saml.SAMLAssertionHandler
      extended by org.apache.rampart.saml.SAML2AssertionHandler

public class SAML2AssertionHandler
extends SAMLAssertionHandler

This class handles SAML2 assertions.Processes SAML2 assertion and will extract SAML2 attributes such as assertion id, start date, end date etc ...


Constructor Summary
SAML2AssertionHandler(org.opensaml.saml2.core.Assertion samlAssertion)
           
 
Method Summary
 org.apache.axiom.om.OMElement getAssertionElement()
          Gets the assertion element as an Axiom OMElement.
 byte[] getAssertionKeyInfoSecret(org.apache.ws.security.components.crypto.Crypto signatureCrypto, TokenCallbackHandler tokenCallbackHandler)
          Gets the secret in assertion.
 boolean isBearerAssertion()
          Checks whether SAML assertion is bearer - urn:oasis:names:tc:SAML:2.0:cm:bearer
protected  void processSAMLAssertion()
           
 
Methods inherited from class org.apache.rampart.saml.SAMLAssertionHandler
getAssertionId, getDateNotBefore, getDateNotOnOrAfter, setAssertionId, setDateNotBefore, setDateNotOnOrAfter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAML2AssertionHandler

public SAML2AssertionHandler(org.opensaml.saml2.core.Assertion samlAssertion)
Method Detail

isBearerAssertion

public boolean isBearerAssertion()
Checks whether SAML assertion is bearer - urn:oasis:names:tc:SAML:2.0:cm:bearer

Specified by:
isBearerAssertion in class SAMLAssertionHandler
Returns:
true if assertion is bearer else false.

processSAMLAssertion

protected void processSAMLAssertion()
Specified by:
processSAMLAssertion in class SAMLAssertionHandler

getAssertionKeyInfoSecret

public byte[] getAssertionKeyInfoSecret(org.apache.ws.security.components.crypto.Crypto signatureCrypto,
                                        TokenCallbackHandler tokenCallbackHandler)
                                 throws org.apache.ws.security.WSSecurityException
Description copied from class: SAMLAssertionHandler
Gets the secret in assertion.

Specified by:
getAssertionKeyInfoSecret in class SAMLAssertionHandler
Parameters:
signatureCrypto - Signature crypto info, private,public keys.
tokenCallbackHandler - The token callback class. TODO Why ?
Returns:
Secret as a byte array
Throws:
org.apache.ws.security.WSSecurityException - If an error occurred while validating the signature.

getAssertionElement

public org.apache.axiom.om.OMElement getAssertionElement()
                                                  throws TrustException
Description copied from class: SAMLAssertionHandler
Gets the assertion element as an Axiom OMElement.

Specified by:
getAssertionElement in class SAMLAssertionHandler
Returns:
OMElement representation of assertion.
Throws:
TrustException - if an error occurred while converting Assertion to an OMElement.