#542728 patch by alippai and me: added a small extension module for supporting better token integration