How to update(change ) UserIdentity in IBM Mobilefirst -
i trying change useridentity different credentials. gets successful login realm new userid not getting updated in mobilefirst console. console still shows old userid.
i using following code.
function submitauthentication(username, password){ useridentity = { userid: username, displayname: "sample", attributes: { foo: "bar" } }; wl.server.setactiveuser("authrealm", null); wl.server.setactiveuser("authrealm", useridentity); return { authstatus: "complete" , result: "success" }; // } }
i saw below error @ android client side, challengehandler class/handlechallenge method
07-12 07:14:34.265 13001-13078/system.err: java.lang.nullpointerexception: attempt invoke virtual method 'boolean com.worklight.wlclient.wlrequest.shouldfailonchallengecancel()' on null object reference 07-12 07:14:34.266 13001-13078/com.mfp w/system.err: @ com.worklight.wlclient.api.wlclient$invokeprocedurerequestlistener.onfailure(wlclient.java:1376) 07-12 07:14:34.266 13001-13078/com.mfp w/system.err: @ com.worklight.wlclient.wlrequest.triggerunexpectedonfailure(wlrequest.java:337) 07-12 07:14:34.266 13001-13078/com.mfp w/system.err: @ com.worklight.wlclient.wlrequest.requestfinished(wlrequest.java:295) 07-12 07:14:34.266 13001-13078/com.mfp w/system.err: @ com.worklight.wlclient.wlrequestsender.run(wlrequestsender.java:52) 07-12 07:14:34.266 13001-13078/com.mfp w/system.err: @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1113) 07-12 07:14:34.266 13001-13078/com.mfp w/system.err: @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:588) 07-12 07:14:34.266 13001-13078/com.mfp w/system.err: @ java.lang.thread.run(thread.java:818) 07-12 07:14:34.333 13001-13007/com.mfp w/art: suspending threads took: 66.075ms
the below issue
activerequest(wlrequest object) in basechallengehandler null while calling submitsuccess(); in challengehandler reason getting above error . not able resolve main issue able ride of above mentioned error.
the below place place activerequest not given right value. request.getoptions().isfromchallenge() true value of activerequest not set right value.its null after this.
so made fromchallenge false.
public void starthandlechallenge(wlrequest request, t challenge) { synchronized(this) { if(!request.getoptions().isfromchallenge()) { if(this.activerequest != null) { this.requestwaitinglist.add(request); return; } this.activerequest = request; } } this.handlechallenge(challenge); }
Comments
Post a Comment