ghost rider3
ghost rider3

Reputation: 458

Worklight having the same session for all users

I'm facing a problem related to the users' session. I'm using Adapter Based Authentication which I user to authenticate the user to have secret data from the web service.

For example when the user1 login, he gets his own data. Now when the user2 login , he gets his own data. But the user1 , also , get the user2's data. So all the users are getting the data of last login user.

I tried to put this connectAs="endUser" but I'm still facing the same problem. Any idea to solve this problem.

Practically I have the opposite behaviour of this question: IBM Worklight 6.0 - Adapter with basic auth doesn't update auth header if client logs out/in

this is the 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>

Upvotes: 0

Views: 224

Answers (1)

David Dhuyveter
David Dhuyveter

Reputation: 1416

connectas enduser should be set on getsecretdata, not on authenticate.

Upvotes: 1

Related Questions