org.wso2.solutions.identity.relyingparty.saml
Class SAMLTokenVerifier

java.lang.Object
  extended by org.wso2.solutions.identity.relyingparty.saml.SAMLTokenVerifier

public class SAMLTokenVerifier
extends java.lang.Object

A SAML token is sent to a web application in a CardSpace login attempt and this can be used for decryption and verification of those tokens.


Constructor Summary
SAMLTokenVerifier()
           
 
Method Summary
 org.w3c.dom.Element decryptToken(java.lang.String token, java.security.PrivateKey serviceKey)
          Decrypt the given token (as a java.lang.String with the given private key.
 java.util.Hashtable getAttributeTable()
          Returns the list of attributes extracted from the SAMLAttributeStatements in the verified SAML assertion.
 java.util.List getCertificates()
           
 java.lang.String getIssuerName()
           
 org.w3c.dom.Element getKeyInfoElement()
           
 java.security.cert.X509Certificate getSigningCert()
           
 boolean isMultipleValues()
           
 void setIssuerName(java.lang.String issuer)
           
 void setMultipleValues(boolean isMultipleValues)
           
 boolean verifyDecryptedToken(org.w3c.dom.Element decryptedElem, RelyingPartyData rpData)
          This method performs two actions 1) Decrypt the token 2) Verify the token
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAMLTokenVerifier

public SAMLTokenVerifier()
Method Detail

decryptToken

public org.w3c.dom.Element decryptToken(java.lang.String token,
                                        java.security.PrivateKey serviceKey)
                                 throws RelyingPartyException
Decrypt the given token (as a java.lang.String with the given private key.

Parameters:
token - Serialized SAML token
serviceKey - Private key to be used for decryption.
Returns:
Decrypted SAML token element.
Throws:
RelyingPartyException

verifyDecryptedToken

public boolean verifyDecryptedToken(org.w3c.dom.Element decryptedElem,
                                    RelyingPartyData rpData)
                             throws RelyingPartyException
This method performs two actions 1) Decrypt the token 2) Verify the token

Parameters:
decryptedElem - SAML token element
Returns:
true if verification is successful and false if unsuccessful.
Throws:
SAMLException
RelyingPartyException

getSigningCert

public java.security.cert.X509Certificate getSigningCert()

getAttributeTable

public java.util.Hashtable getAttributeTable()
Returns the list of attributes extracted from the SAMLAttributeStatements in the verified SAML assertion.

Returns:
List of attributes as a java.util.Hashtable

getCertificates

public java.util.List getCertificates()

getKeyInfoElement

public org.w3c.dom.Element getKeyInfoElement()

getIssuerName

public java.lang.String getIssuerName()

setIssuerName

public void setIssuerName(java.lang.String issuer)

isMultipleValues

public boolean isMultipleValues()

setMultipleValues

public void setMultipleValues(boolean isMultipleValues)