I am new to openfire and trying to authorise client from jwt instead of username and password. Any suggestions?

I am trying to use just a jwt to authorise users. Currently, username and password are required to do so. Maybe I can create a plugin to do so? if yes then please give me a direction to pursue.