Allow single concurrent login in Python / JSON?
#1
HI folks,

I've managed to create a plugin using JSON / Python, with a login function as well. Working great, however, there's no validation apart from checking user / pass in the DB, meaning the same credentials could work on an unlimited number of devices! I want it to be one login, one device... but i have no idea how to go about doing that, been trying sessions, cookies, no luck. If there was a way to know when the plugin is launched for the first, to send a unique value to the DB that identifies that device, that'd be great, but I don't think there is. What are your thoughts?
Reply
#2
Generate UUID, store it locally and register it in your DB along with login/pass. Then you can verify if a locally stored UUID matches the UUID in your DB. Of course, someone too clever can re-use a locally stored UUID but you can't get absolute protection from people with minimal Python knowledge anyway without going into murky waters of binary Python modules.
Reply

Logout Mark Read Team Forum Stats Members Help
Allow single concurrent login in Python / JSON?0