简体   繁体   English

Typo3后端登录身份验证服务分多个步骤

[英]Typo3 Backend Login auth service with multiple steps

I am trying to implement a 2factor login for the typo3 backend to authenticate via a mobile App / Api. 我正在尝试为typo3 后端实现2factor登录,以通过移动App / Api进行身份验证。
I tried an auth service with getUser and authUser overrides and my own login template in ext_tables.php which works great with just the login form. 我在ext_tables.php中尝试了使用getUser和authUser覆盖以及我自己的登录模板的auth服务,该服务仅适用于登录表单。
However, I need multiple views / steps: 但是,我需要多个视图/步骤:

  1. Form with App-UserID & submit button 带有App-UserID的表单和提交按钮
  2. Accesspass & submit button Accesspass和提交按钮

I tried to display the 2. view with 我试图显示2.视图

GeneralUtility::makeInstance('TYPO3\\CMS\\Fluid\\View\\StandaloneView'); 

In the authUser function but I am looking for a cleaner (maybe MVC/extbase?) approach or best practice. 在authUser函数中,但是我正在寻找一种更清洁的方法(也许是MVC / extbase?)或最佳实践。
How can I implement a 2 step backend login and pass variables between those views? 如何实现两步后端登录并在这些视图之间传递变量?

I believe that this is not possible. 我相信这是不可能的。 TYPO3 checks all installed Auth-Services in the order of the priority of each service. TYPO3按照每个服务的优先级顺序检查所有已安装的Auth-Service。 There is no point, where you can hook into that process and stop the authentication process to display a form. 毫无疑问,您可以进入该过程并停止身份验证过程以显示表单。

I would suggest to implement the accesspass field into your custom TYPO3 backend login template, so you have 3 fields for the loginprocess. 我建议将accesspass字段实现到您的自定义TYPO3后端登录模板中,因此您有3个用于loginprocess的字段。 You can split the evaluation of the fields in different auth services (ordered by the priority of your need). 您可以将字段的评估划分为不同的身份验证服务(按需要的优先级排序)。 For a working example see my YubiKey TYPO3 extension , which first authenticates the TYPO3 backend user by username/password (TYPO3 default authentication) and then by a YubiKey OTP. 有关工作示例,请参见我的YubiKey TYPO3扩展 ,该扩展首先通过用户名/密码(TYPO3默认身份验证)然后通过YubiKey OTP对TYPO3后端用户进行身份验证。

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

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