it.eng.rdlab.soa3.assertion.validation
Class Assertionsvalidation

java.lang.Object
  extended by it.eng.rdlab.soa3.assertion.validation.Assertionsvalidation
All Implemented Interfaces:
IAssertionValidator

public class Assertionsvalidation
extends Object
implements IAssertionValidator

Assertions validator - This class provides the functionality to validate the signature of the assertions xmlobject

Author:
Kanchanna Ramasamy Balraj, Ciro Formisano

Constructor Summary
Assertionsvalidation()
          This is a requirement for the Opensaml lib - public no arg constructor
 
Method Summary
 void configure(ConfigurationBean configuration)
           
 org.opensaml.saml2.core.Assertion getAssertionObject(String assertionString)
          Generates an assertion object from a string
 org.opensaml.saml2.core.Assertion validateAssertions(String xml)
          This method is invoked by the clients/stubs to validate the signature of assertions using the public key of the signed entity read from a file, returns null if signature is not valid
 boolean validateSignature(org.opensaml.saml2.core.Assertion assertion)
          Validates the signature of the assertion
 boolean validateTimeInterval(org.opensaml.saml2.core.Assertion assertion)
          Validates the lifetime of the assertion basing on the notBefore and notOnOrAfter properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Assertionsvalidation

public Assertionsvalidation()
This is a requirement for the Opensaml lib - public no arg constructor

Method Detail

configure

public void configure(ConfigurationBean configuration)
Specified by:
configure in interface IAssertionValidator

validateAssertions

public org.opensaml.saml2.core.Assertion validateAssertions(String xml)
                                                     throws AssertionValidationException,
                                                            org.opensaml.xml.ConfigurationException
Description copied from interface: IAssertionValidator
This method is invoked by the clients/stubs to validate the signature of assertions using the public key of the signed entity read from a file, returns null if signature is not valid

Specified by:
validateAssertions in interface IAssertionValidator
Parameters:
xml - SAML assertion in String
Returns:
Assertion object if signature is valid or null if the signature is invalid
Throws:
AssertionValidationException - in case of any exceptions
org.opensaml.xml.ConfigurationException - if an invalid configuration has been inserted

getAssertionObject

public org.opensaml.saml2.core.Assertion getAssertionObject(String assertionString)
Description copied from interface: IAssertionValidator
Generates an assertion object from a string

Specified by:
getAssertionObject in interface IAssertionValidator
Returns:
an assertion object if the generation process has been correctly completed, null otherwise

validateTimeInterval

public boolean validateTimeInterval(org.opensaml.saml2.core.Assertion assertion)
Description copied from interface: IAssertionValidator
Validates the lifetime of the assertion basing on the notBefore and notOnOrAfter properties

Specified by:
validateTimeInterval in interface IAssertionValidator
Returns:
true if the validation is OK, false otherwise

validateSignature

public boolean validateSignature(org.opensaml.saml2.core.Assertion assertion)
                          throws org.opensaml.xml.ConfigurationException
Description copied from interface: IAssertionValidator
Validates the signature of the assertion

Specified by:
validateSignature in interface IAssertionValidator
Parameters:
assertion - the assertion
Returns:
true if the signature is valid, false otherwise
Throws:
org.opensaml.xml.ConfigurationException


Copyright © 2013. All Rights Reserved.