Authentication 如何使工作流身份验证在Aviarc中工作

Authentication 如何使工作流身份验证在Aviarc中工作,authentication,aviarc,Authentication,Aviarc,我们正在尝试在我的应用程序中推出身份验证,但它对我们不起作用 我们已经设置了当前权限和当前授权人,甚至还将登录查询设置为只选择“a”,因此我们保证会得到一个结果集 我们已将登录工作流复制到workflows/system目录 看起来它甚至没有尝试运行登录查询 start.xml工作流: <workflow> <authenticate error-screen="login-error" dataset="login"> <show-scre

我们正在尝试在我的应用程序中推出身份验证,但它对我们不起作用

我们已经设置了当前权限和当前授权人,甚至还将登录查询设置为只选择“a”,因此我们保证会得到一个结果集

我们已将登录工作流复制到workflows/system目录

看起来它甚至没有尝试运行登录查询

start.xml工作流:

<workflow>
    <authenticate error-screen="login-error" dataset="login">
        <show-screen name="login" />
    </authenticate>
    <call-workflow name="home"/>
</workflow>
<workflow xmlns:au-security="urn:aviarc:xmlcommand:au.com.aviarc.xmlcommand.security">

    <au-security:hash-text text="{$login.user_password}" result-field="login.hashed-password" />

    <dataset name="cslogin" databroker="loginqry" query="get-all">
        <param name="username" value="{$login.user_name}" />
        <param name="password" value="{$login.hashed-password}" />
    </dataset>

    <if test="dataset-empty" value1="cslogin">
        <then>
            <set-field field="login.authenticated" value="n"/>
        </then>
        <else>
            <set-field field="login.authenticated" value="y"/>
        </else>
    </if>
</workflow>

login.xml屏幕:

<screen xmlns:action="urn:aviarc:widget:com.aviarc.toronto.widget.core.action:1"
    xmlns:app="urn:aviarc:widget:application">

    <group-box visible="y" left="10" right="4" top="10" bottom="4" class="blue">

        <image height="80" width="245" left="10" top="5" class="mfcologo" />
        <line height="5" left="0" right="0" top="120" class="myerblue" />

        <text-static visible="y" left="74" top="151" width="80" height="20" text="User name:" />
        <text-static visible="y" left="234" top="151" width="80" height="20" text="Password:" />

        <text-edit name="username" left="74" top="182" width="100" height="20" field="login.user_name" />
        <text-edit name="password" left="234" top="182" width="100" height="20" field="login.user_password" datatype="password" />

        <button left="376" top="182" width="60" height="20" label="Login" action="Next"/>
    </group-box>
</screen>

系统/Login.xml工作流:

<workflow>
    <authenticate error-screen="login-error" dataset="login">
        <show-screen name="login" />
    </authenticate>
    <call-workflow name="home"/>
</workflow>
<workflow xmlns:au-security="urn:aviarc:xmlcommand:au.com.aviarc.xmlcommand.security">

    <au-security:hash-text text="{$login.user_password}" result-field="login.hashed-password" />

    <dataset name="cslogin" databroker="loginqry" query="get-all">
        <param name="username" value="{$login.user_name}" />
        <param name="password" value="{$login.hashed-password}" />
    </dataset>

    <if test="dataset-empty" value1="cslogin">
        <then>
            <set-field field="login.authenticated" value="n"/>
        </then>
        <else>
            <set-field field="login.authenticated" value="y"/>
        </else>
    </if>
</workflow>

工作流身份验证要求在输入“用户名”字段之前填充该字段,否则身份验证将立即失败,并显示登录错误屏幕

在您的示例中,将login.xml屏幕中的行更改为:

<text-edit name="username" left="74" top="182" width="100" height="20" field="login.user_name" />

将是:

<text-edit name="username" left="74" top="182" width="100" height="20" field="login.username" />

并在系统/登录工作流中更新对它的引用