[TYPO3-dev] Extension callback URL generation
Conor Hackett
hakko1872003 at yahoo.co.uk
Wed May 18 16:19:27 CEST 2011
On 18/05/11 12:27, Dmitry Dulepov wrote:
> Hi!
>
> Conor Hackett wrote:
>> I'm working on an extension for a web service that uses OAuth2. I need
>> to be able to provide a callback url to the service.
>>
>> I've read on here that I can use an explicit url to a PHP script in my
>> extensions directory.
>>
>> e.g. http://127.0.0.1/typo3/typo3conf/ext/my_plugin/pi1/callback.php
>
> Not gonna work in some environments where you can't access php files
> directly inside typo3conf/ due to security settings.
>
> You will be better with eID.
>
>> I'm thinking the best way would be construct the url using in php and
>> output to the user on the setup page. The following code:
>>
>> t3lib_div::getThisUrl().'typo3conf/ext/ch_guestbook/pi1/callback.php
>
> Never ever! Right way:
>
> t3lib_div::locationHeaderUrl(t3lib_extMgm::siteRelPath('ch_guestbook'),
> 'path/inside/the/ext')
>
> But you still be better with eID.
>
>> This script will then take the code provided in the callback ($_GET) and
>> save it as a setting (salted & encrypted).
>
> Not $_GET but t3lib_div::_GET()!
>
Ok, thanks for the advice.
Where can I get a value for this eID variable? And also, how can I
construct a URL to it?
I've noticed that if I access my PHP file directly I can't access t3
classes.
Thanks.
More information about the TYPO3-dev
mailing list