sugarcrm/sugarcrm_dev — pull request #200 by jamesryanalexander (2014-03-20 02:20:39+00:00)
Title: Fix OAuth constructor to correctly allow request token creation

Bug filed with more detailed explanation Defect 67944 at https://web.sugarcrm.com/support/issues/632e7f17-63a6-6797-41e0-532a4f224ab3

Smallest change to get the system to work, so far done extensive testing and have not found any drawbacks but I imagine there is a 'better' way which would require a bit more changes within SugarOAuthServer. setRequestTokenPath would set the requestPath but when needsToken() was called it checked is_request which was never set (and so told the system that a token was indeed required). Function I switched to ( isRequestTokenEndpoint ) sets the is_request variable and therefore needsToken() correctly responds false.