<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Oauth State parameter with special character being altered in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Oauth-State-parameter-with-special-character-being-altered/m-p/65360#M39040</link>
    <description>&lt;P&gt;I am working on adding Oauth support to my Authorize.net API integration.&amp;nbsp; My existing system has logic in place to use the "state" parameter both to validate and redirect users to the necessary page after requesting the initial token.&amp;nbsp; I am looking to reuse this method that works for several other of our Oauth integrations and as such it's not simple to change.&amp;nbsp; In testing Authorize.net's oauth, special characters seem to be getting stripped out from the state param, notably the "^" character.&amp;nbsp; I have tested encoding and escaping it in the URL in different ways but this seems to either have no effect or causes an error.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As an example, we are redirecting the user to:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://sandbox.authorize.net/oauth/authorize?sub=oauth&amp;amp;client_id=clientId&amp;amp;redirect_uri=https%3a%2f%2fwww.myhost.com%2fapp%2fredirectOauthToken&amp;amp;scope=read%2cwrite&amp;amp;state=stateInfo1^stateInfo2" target="_blank"&gt;https://sandbox.authorize.net/oauth/authorize?sub=oauth&amp;amp;client_id=clientId&amp;amp;redirect_uri=https%3a%2f%2fwww.myhost.com%2fapp%2fredirectOauthToken&amp;amp;scope=read%2cwrite&amp;amp;state=stateInfo1^stateInfo2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(note the param "state=stateInfo1^stateInfo2")&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;but at the end they get redirected back to&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.myhost.com/app/redirectOauthToken?code=xxxx&amp;amp;state=stateInfo1stateInfo2" target="_blank"&gt;https://www.myhost.com/app/redirectOauthToken?code=xxxx&amp;amp;state=stateInfo1stateInfo2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(note the param "state=stateInfo1stateInfo2")&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Note the state param is missing the "^" between "stateInfo1" and "stateInfo2".&amp;nbsp; We have tried passing the ^ as shown as well as URL encoding it to %5E, escaping it with slashes, etc.&amp;nbsp; I tested passing state=stateInfo1%20stateInfo2, and in the redirect back to us the state param was "state=stateInfo1 stateInfo2" with the space, but %5E just gets removed as shown above.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is there a way to get the Redirect URI to be followed and keep the state param value unchanged?&lt;/P&gt;</description>
    <pubDate>Fri, 14 Dec 2018 18:35:31 GMT</pubDate>
    <dc:creator>Ericaf</dc:creator>
    <dc:date>2018-12-14T18:35:31Z</dc:date>
    <item>
      <title>Oauth State parameter with special character being altered</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Oauth-State-parameter-with-special-character-being-altered/m-p/65360#M39040</link>
      <description>&lt;P&gt;I am working on adding Oauth support to my Authorize.net API integration.&amp;nbsp; My existing system has logic in place to use the "state" parameter both to validate and redirect users to the necessary page after requesting the initial token.&amp;nbsp; I am looking to reuse this method that works for several other of our Oauth integrations and as such it's not simple to change.&amp;nbsp; In testing Authorize.net's oauth, special characters seem to be getting stripped out from the state param, notably the "^" character.&amp;nbsp; I have tested encoding and escaping it in the URL in different ways but this seems to either have no effect or causes an error.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As an example, we are redirecting the user to:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://sandbox.authorize.net/oauth/authorize?sub=oauth&amp;amp;client_id=clientId&amp;amp;redirect_uri=https%3a%2f%2fwww.myhost.com%2fapp%2fredirectOauthToken&amp;amp;scope=read%2cwrite&amp;amp;state=stateInfo1^stateInfo2" target="_blank"&gt;https://sandbox.authorize.net/oauth/authorize?sub=oauth&amp;amp;client_id=clientId&amp;amp;redirect_uri=https%3a%2f%2fwww.myhost.com%2fapp%2fredirectOauthToken&amp;amp;scope=read%2cwrite&amp;amp;state=stateInfo1^stateInfo2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(note the param "state=stateInfo1^stateInfo2")&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;but at the end they get redirected back to&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.myhost.com/app/redirectOauthToken?code=xxxx&amp;amp;state=stateInfo1stateInfo2" target="_blank"&gt;https://www.myhost.com/app/redirectOauthToken?code=xxxx&amp;amp;state=stateInfo1stateInfo2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(note the param "state=stateInfo1stateInfo2")&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Note the state param is missing the "^" between "stateInfo1" and "stateInfo2".&amp;nbsp; We have tried passing the ^ as shown as well as URL encoding it to %5E, escaping it with slashes, etc.&amp;nbsp; I tested passing state=stateInfo1%20stateInfo2, and in the redirect back to us the state param was "state=stateInfo1 stateInfo2" with the space, but %5E just gets removed as shown above.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is there a way to get the Redirect URI to be followed and keep the state param value unchanged?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 18:35:31 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Oauth-State-parameter-with-special-character-being-altered/m-p/65360#M39040</guid>
      <dc:creator>Ericaf</dc:creator>
      <dc:date>2018-12-14T18:35:31Z</dc:date>
    </item>
  </channel>
</rss>

