2

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

它会正常工作,还是会导致问题?

有点像这样:

 <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>
4

1 回答 1

0

这应该有效。虽然我不明白这样做的目的......

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

于 2013-05-07T10:39:42.217 回答