Hi Nadeesha, Could that be the 'new line' characters in your assertion.xml causing this problem? could you try removing them and get the base 64 encoded value?
Thanks, Sajith On Fri, Jul 3, 2015 at 1:43 PM, Nadeesha Gamage <[email protected]> wrote: > Hi all, > I am trying to exchange a SAML2Bearer token to a OAuth 2.0 as described in > the following documentation[1]. I have set the servers up as described in > the document and using the SAML2AssertionCreator.jar to create SAML > assertion. I am using this assertion (decoded assertion) to generate a > OAuth2.0 token by invoking the following command > > curl -k -d > "grant_type=urn:ietf:params:oauth:grant-type:saml2-bearer&assertion=<Base > 64 encoded assertion>&scope=PRODUCTION" -H "Authorization: Basic <Base 64 > encoded ConsumerKey:Secret>, Content-Type: > application/x-www-form-urlencoded" https://localhost:8244/token > > However when I make this invocation to the API Manager I get the following > error. Can anyone suggest how I can solve this. > > [Fatal Error] :1:276: Element type "saml:Issuer" must be followed by > either attribute specifications, ">" or "/>". > [2015-07-03 13:36:26,163] ERROR - SAML2BearerGrantHandler Error in > constructing XML Object from the encoded String > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 276; Element > type "saml:Issuer" must be followed by either attribute specifications, ">" > or "/>". > at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) > > SAML assertion generated from the AssertionCreator is attached with the > mail > > [1] https://docs.wso2.com/pages/viewpage.action?pageId=45944343 > -- > Nadeesha Gamage > Associate Technical Lead - Solutions Engineering > T : +94 77 394 5706 > B : https://nadeesha678.wordpress.com/ > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Sajith Kariyawasam *Committer and PMC member, Apache Stratos, * *WSO2 Inc.; http://wso2.com <http://wso2.com>* *Mobile: 0772269575*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
