简体   繁体   English

TYPO3回调URL,如何制作一个?

[英]TYPO3 callback url, how to make one?

I'm trying to integrate a third party app in TYPO3. 我正在尝试在TYPO3中集成第三方应用程序。 This app needs to be authenticated via OAuth. 此应用需要通过OAuth进行身份验证。 To do this the user is redirected to the app's login, then logs in and then should be redirected (with token data) back to TYPO3. 为此,将用户重定向到应用程序的登录名,然后登录,然后应将其(带有令牌数据)重定向回TYPO3。

I have a script that can catch the token data setup in myextension/Resources/Public/Callback.php 我的脚本可以在myextension / Resources / Public / Callback.php中捕获令牌数据设置

However, I need to send the callback url to the third party app when I initiated the authentication process. 但是,在启动身份验证过程时,我需要将回调URL发送给第三方应用。 My question is: what url do I have to supply if I want the callback to go to a script located in myextension/Resources/Public/ ? 我的问题是:如果我希望回调进入位于myextension / Resources / Public /中的脚本,我必须提供什么url?

Does TYPO3 have methods to generate urls like this? TYPO3是否具有生成此类网址的方法? I'd love to hear about the methods. 我希望知道这些方法。 I've been browsing TYPO3 forums for hours, but couldn't get a concrete example nor a working solution. 我已经在TYPO3论坛上浏览了几个小时,但无法获得具体示例或有效的解决方案。

Thanks! 谢谢!

You should not run a standalone script but pipe it through TYPO3. 您不应运行独立脚本,而应通过TYPO3将其传递。 If you do that, you have database and things available. 如果这样做,您将拥有数据库和可用的东西。

Depending on what the callback is used for, an eID might be the best way. 根据回调的用途,最好使用eID

Register it in ext_localconf.php with: 使用以下命令在ext_localconf.php注册它:

$TYPO3_CONF_VARS['FE']['eID_include']['keyword'] = 'EXT:myExtKey/eID/myScript.php';

The URL of that script is now /index.php?eID=keyword and you can add as many parameters as you wish. 该脚本的URL现在为/index.php?eID=keyword ,您可以根据需要添加/index.php?eID=keyword参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM