WIP:Change token generation flow on api publish #289

Closed
shamalka1 wants to merge 2 commits from shamalka1/device-mgt-core:201013 into master