Bitbucket custom authentication plugin

We are in the process of developing a custom JWT based authentication plugin for bitbucket using atlassian plugin SDK. We are referencing the following plugin from open source - Bitbucket

We have following questions regarding plugin development:

  1. Why the command atlas-create-bitbucket-plugin-module doesn’t show up the HttpAuthenticationHandler plugin module described here - HTTP Authentication Handler Plugin Module. We got around this by manually updating the atlassian-plugin.xml file.

  2. When implementing performAuthentication() method of HttpAuthenticationHandler, we need to return an object of AuthenticationResult and the builder for AuthenticationResult expects an object of ApplicationUser, which is retrieved by UserService.getUserByUsername(username). Does this mean that username should be present in bibucket’s internal user directory? Because in our case, it won’t be present in Bitbucket’s internal user directory. We just validate the jwt token and if validation is successful, we expect performAuthentication method to authenticate the user without the need for it to be present in Bitbucket’s internal user directory? Is this achievable?