We are trying to integrate Openfire in our organisation. It seems to be very good opensource server library for chat. Thanks to the community and team.
I am trying to do some code changes or write a plugin which basically disables the SASL authentication and user name password authentication, which is used in the http-bind embedded bosh server in openfire.
I want the authentication to be done based on JWT token which will be passed in the cookies in request from front end. This JWT token will contain the username and once user will try to access openfire than it will automatically get logged in and create a session by extracting the user details from the JWT token.
Is there any way to write a plugin (which class I need to extend ? ) or configuration to achieve this.
I have looked into the source code and finds that currently BoshServer is getting initiated from HttpBindManager and while registering HttpBindServlet there is no option to register any Filters, is it possible to register custom filters in plugin?
Also I have seen that HttpServletRequest object is only available in HttpBindServlet and there is no provision to retrieve the cookies or pass cookies into other layer. also in SessionPacketRouter while routing packages SASLAuthentication.handle(session, wrappedElement); is hardcoded and no provision to call any plugin class.
We are trying to connect with Strophe.js or conversejs for the front end.