Worklight: multiple security realms

人盡茶涼 提交于 2019-12-08 03:08:19

问题


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

Will it work fine, or cause problems?

Sort of like this:

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

回答1:


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

Tip: Understanding the Pre-defined Authentication Realms and Security Tests in Worklight



来源:https://stackoverflow.com/questions/16416461/worklight-multiple-security-realms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!