Step 1
When I submit answer in handle challenge of WL.Client.createWLChallengeHandler
in the very first request, the headers section contains wl_deviceNoProvisioningRealm
which also contains a device ID which is different from the device id received when using WL.Device.getID
.
At the time of login, the server saves the device id and at the time of accessing the protected resources, it compares the device id with oAuthSecurityContext.getDeviceIdentity().getId()
in order to maintain unique login: one device - one user.
{"AppRealm":{"parameters":{"reqURL":"/mobile/user/authentication","user.name":"tesla","user.password":"password","user.deviceId":"025bdc29-959c-4b0c-8a89-cf85b0790aaf"},"headers":{}},"wl_deviceNoProvisioningRealm":{"ID":{"token":"o2rp4qn6skhij80v2lk74bq2nu","app":{"id":"ollections","version":"1.0"},"device":{"id":"+obkd/fe9Py8y9/RVgVqT3oot2sl6FzVE1AKAAOOHww=","os":"8.10.14234.0","model":"RM-1019_1003","environment":"windowsphone8"},"custom":{}}}}
Step 2
When handling a scenario of a failure occurring due to wrong login credentials, if I submit the answer again in the second request, wl_deviceNoProvisioningRealm
is not present so the device Id can't be received on server-side.
See below object:
{"AppRealm":{"parameters":{"reqURL":"/mobile/user/authentication","user.name":"tesla","user.password":"password","user.deviceId":"025bdc29-959c-4b0c-8a89-cf85b0790aaf"},"headers":{}}
why am I getting different device IDs in Windows Phone only but same device ID in Android and iOS?
ID generated by IMF request auth header:
+obkd/fe9Py8y9/RVgVqT3oot2sl6FzVE1AKAAOOHww=
ID generated by Wl.Device.getID :
025bdc29-959c-4b0c-8a89-cf85b0790aaf