I am currently having an issue where if I am using custom authentication, such as that in Module 22 – Custom Login Module, the user id sent when registering for push notifications is not that of the username I logged in with.
I am able to see the user id that is registered through logging, which seems to be a randomly generated sequence of letters and numbers.
The Push Notification module uses simple form based authentication, and does work for sending the user id properly, but the code copied directly from the Custom Login module does not. So I am thinking there is something missing in that code to set the current user, even though it does verify that I am authenticated.
Also when I try to run WL.Client.getLoginName or getUserName it always returns “undefined”, in both the Push and Custom Login modules, so I am not able to check what it thinks my user name is.
I have put the push module code into the customer authentication module and get the same results, randomly generated userId instead of the one I logged in with.
This topic has been locked.
Pinned topic Issue with Push UserId and Custom Login Module
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
IdanAdar 2700059KWB741 Posts
Re: Issue with Push UserId and Custom Login Module2013-01-23T11:21:29ZThis is the accepted answer. This is the accepted answer.Hi,
Can you show me the following files from your project?
application-descriptor.xml, authenticationConfig.xml, adaptr's implementation file (where the event source function is)
When using push notifications, you need to add your securityTest also to the WL.Server.createEventSource function (I believe this can be seen in the Push Notifications samepl).
IBM Worklight Mobile Platform
SystemAdmin 110000D4XK2327 Posts
Re: Issue with Push UserId and Custom Login Module2013-01-24T19:37:20ZThis is the accepted answer. This is the accepted answer.
- IdanAdar 2700059KWB