In SamlSubjectParser getting exception when trying to parse the nameid tag. We are decrypting the assertion first and then parsing.
Unencrypted subject is :
<ns2:Subject>^M
<ns2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">iesspdev</ns2:NameID>^M
<ns2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">^M
<ns2:SubjectConfirmationData NotOnOrAfter="2020-06-01T14:34:31Z" Recipient="https://XXXXXXXXXX"/>^M
</ns2:SubjectConfirmation>^M
</ns2:Subject>^M
Exception we are getting is :
< ClassCastException occured because org.codehaus.stax2.ri.evt.CharactersEventImpl cannot be cast to javax.xml.stream.events.EndElement. But Continuing with Flow of Execution.. >
java.lang.ClassCastException: org.codehaus.stax2.ri.evt.CharactersEventImpl cannot be cast to javax.xml.stream.events.EndElement
at org.picketlink.identity.federation.core.parsers.saml.SAMLSubjectParser.parse(SAMLSubjectParser.java:128)
at org.picketlink.identity.federation.core.parsers.saml.SAMLAssertionParser.parse(SAMLAssertionParser.java:132)
at org.picketlink.identity.federation.core.parsers.saml.SAMLAssertionParser.fromElement(SAMLAssertionParser.java:67)