0

我正面临与用户会话有关的问题。我使用的是基于适配器的身份验证,我用它来验证用户是否拥有来自Web服务的秘密数据。工作灯对所有用户都具有相同的会话

例如,当user1登录时,他获取他自己的数据。现在当用户2登录时,他得到他自己的数据。但user1也获取user2的数据。所以所有的用户都得到最后登录用户的数据。

我试图把这个connectAs="endUser",但我仍然面临同样的问题。 任何想法来解决这个问题。

实际上我有这个问题的相反的行为: IBM Worklight 6.0 - Adapter with basic auth doesn't update auth header if client logs out/in

这是authenticationConfig.xml:

<securityTests> 
    <customSecurityTest name="AdapterSecurityTest"> 
     <test isInternalUserID="true" realm="AdapterAuthRealm" /> 
    </customSecurityTest> 

    <mobileSecurityTest name="PushSecurityTest"> 
     <testUser realm="AdapterAuthRealm"/> 
     <testDeviceId provisioningType="none"/> 
    </mobileSecurityTest> 

</securityTests> 


<realms> 
    <realm name="AdapterAuthRealm" loginModule="AdapterLoginModule"> 
     <className>com.worklight.integration.auth.AdapterAuthenticator</className> 
     <parameter name="login-function" value="MyAdapter.onAuthRequired" /> 
     <parameter name="logout-function" value="MyAdapter.onLogout" /> 
    </realm> 
</realms> 

<loginModules> 
    <loginModule name="AdapterLoginModule"> 
     <className>com.worklight.core.auth.ext.NonValidatingLoginModule</className> 
    </loginModule> 
</loginModules> 
+1

您正在使用的worklight的版本是什么?你能提供你的适配器描述符和实现吗?每个用户都在自己的设备上,还是两个用户使用相同的设备/浏览器? –

+0

我使用工作灯6.0.0.201307011446,这是适配器描述:'<连通> \t \t \t \t \t HTTP \t \t \t myserver.com \t \t \t \t \t \t \t \t \t <过程名称= “认证” connectAs = “终端用户”/> \t <过程名称= “getSecretData” securityTest = “AdapterSecurityTest”/ >' –

回答

1

connectas终端用户应该getsecretdata设置,不进行身份验证。

+0

我试过了,但是我遇到了同样的问题,我做了一些研究。我发现在使用WebSphere作为部署服务器的情况下,我可能需要使用LTPA身份验证更改身份验证适配器!这样对吗 ? –

+0

如果您将WebSphere用作部署服务器,则基于LTPA的身份验证可用,但这不是必需的。如何在适配器中进行身份验证?如果一个标准的认证器(比如WebSphereFormBasedAuthenticator)能够做到这一点,那么你最好使用它,而不是在适配器中进行自己的认证。但仅仅因为您在WebSphere上运行并不意味着您需要使用LTPA。你能否将你的authenticationConfig.xml添加到原始问题中?你在认证程序中做了什么? –

+0

我编辑了问题 –

相关问题