org.apache.rampart.saml
Class SAMLAssertionHandler

java.lang.Object
  extended by org.apache.rampart.saml.SAMLAssertionHandler
Direct Known Subclasses:
SAML1AssertionHandler, SAML2AssertionHandler

public abstract class SAMLAssertionHandler
extends java.lang.Object

A class to handle attributes to common SAML1 and SAML2 assertions.


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

Constructor Detail

SAMLAssertionHandler

public SAMLAssertionHandler()
Method Detail

getAssertionId

public java.lang.String getAssertionId()

setAssertionId

protected void setAssertionId(java.lang.String assertionId)

getDateNotBefore

public java.util.Date getDateNotBefore()

setDateNotBefore

protected void setDateNotBefore(java.util.Date dateNotBefore)

getDateNotOnOrAfter

public java.util.Date getDateNotOnOrAfter()

setDateNotOnOrAfter

protected void setDateNotOnOrAfter(java.util.Date dateNotOnOrAfter)

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.ws.security.components.crypto.Crypto signatureCrypto,
                                                 TokenCallbackHandler tokenCallbackHandler)
                                          throws org.apache.ws.security.WSSecurityException
Gets the secret in assertion.

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 abstract org.apache.axiom.om.OMElement getAssertionElement()
                                                           throws TrustException
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.