Added a method the following method to the SAML2AuthenticationHandler:
protected void onAssertionCreated(SAML2HandlerRequest request, AssertionType assertion) {
// custom logic goes here. change the assertion at your will
}
This method can be overrided by subclasses in order to perform any processing on the assertion issued by the IdP.