Worklight:多个安全领域 [英] Worklight: multiple security realms

查看:137
本文介绍了Worklight:多个安全领域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我们可以在 authenticationconfig.xml 文件中定义多个安全测试吗?

I want to know can we have multiple security tests defined in the authenticationconfig.xml file?

Will它工作正常,或导致问题?

Will it work fine, or cause problems?

这样排序:

 <securityTests>
          <mobileSecurityTest name="myMobileSecurity">
                <testUser realm="myAppRealm"/>
                <testDeviceId provisioningType="none"/>
            </mobileSecurityTest>
            <customSecurityTest name="PushApplication-custom-securityTest">                             
                    <test realm="PushAppRealm" isInternalUserID="true" />   
                </customSecurityTest> 
            <customSecurityTest name="myAppSecurityTestCustom">                             
                    <test realm="myAppRealm" isInternalUserID="true" />   
                </customSecurityTest> 
        </securityTests>

    <realms>
            <realm loginModule="abcModule" name="myAppRealm">
                <className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
                <parameter name="login-page" value="login.html" />
            </realm>
            <realm loginModule="PushAppLoginModule" name="PushAppRealm">                                                
                <className>com.worklight.core.auth.ext.BasicAuthenticator</className>   
                    <parameter name="basic-realm-name" value="PushAppRealm"/>                                                  
            </realm>
            <realm loginModule="requireLogin" name="WorklightConsole">
                <className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
                <onLoginUrl>/console</onLoginUrl>
            </realm>
    </realms>

    <loginModules>
             <loginModule name="PushAppLoginModule">
                <className>com.abc.MyCustomLoginModule</className>
            </loginModule>
            <loginModule name="abcModule">
                <className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
            </loginModule>

            <loginModule name="requireLogin">
                <className>com.worklight.core.auth.ext.SingleIdentityLoginModule</className>
            </loginModule>
    </loginModules>


推荐答案

这应该有效。虽然我没有看到这样做的目的...

This should work. Though I do not see the purpose of doing so...

提示:了解Worklight中预定义的身份验证领域和安全测试

这篇关于Worklight:多个安全领域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆