的Joomla! 3.0 2fa'身份验证'通过小部件

时间:2017-09-26 06:22:07

标签: javascript php joomla two-factor-authentication

您好我正在为Joomla开发一个双因素身份验证插件!因为joomla框架以一种奇怪的方式运作,所以我陷入了某种困境。

我希望用户使用我创建的js 2fa小部件。当小部件中的步骤成功完成时,joomla插件应将结果设置为:

$response->status        = JAuthentication::STATUS_SUCCESS;

只有我似乎无法使用以下方法调用小部件:

JFactory::getDocument()->addScriptDeclaration('/*set and call widget*/');

因为仅在按下登录按钮时才调用onVerification()方法。此时框架已经希望插件知道登录是否成功。

其他溶剂:

如果: 我创建了一个没有2fa字段的新模块。还有一个2fa插件。 登录时会自动调用2fa插件。

步骤:

    When the login button is clicked the credentials get verified.
    If correct.             If Not
        ↓              ↓
    The widget shows.       X Error shows.
        ↓
    Widget session gets filled in in the 2fa field
    (username & pw are also (still) filled in.
        ↓
    2FA plugin checks the widget result 
    If it is success.(logged in)    If not
        ↓              ↓
    X The user is logged in.       X Error shows

X =流程结束。

有没有人能解决这个问题? 提前谢谢。

0 个答案:

没有答案
相关问题