Error in OAuth token exchange if callback url is too long

Create issue
Issue #2522 resolved
Sebastian Böttger created an issue

During implementation of the OAuth authentication in our TYPO3 extension I've encountered an error. The request for the "Request Token" does not work, if the callback URL is too long. In this case you will find the following error in the log:

[2015-08-09 19:31:46,013] [ERROR] [org.bibsonomy.opensocial.oauth.database.IbatisOAuthLogic] - Error creating provider token for '9IDNmMTk2YWFiZjQ0MTAwMDJmM'
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in OpenSocialQueries.xml.  
--- The error occurred while applying a parameter map.  
--- Check the setProviderToken-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'callback_url' at row 1

Unfortunately, I can not change the URL. The callback URL needs a lot of parameters e.g. module name, controller name, action name, validation hash, page id and so on. So I get an URL of about 300 characters length:

http://typo3.local/typo3/mod.php?M=web_ExtBibsonomyCslBibsonomybackend&moduleToken=3cea3b56756760c7adc50721192e050774c42cd9&id=35&tx_extbibsonomycsl_web_extbibsonomycslbibsonomybackend%5Baction%5D=oauthcallback&tx_extbibsonomycsl_web_extbibsonomycslbibsonomybackend%5Bcontroller%5D=Authentication

Comments (6)

  1. Log in to comment