Unknown opened 2 years ago
|
|
Yes, there is an API in Tigase server specifically for this use-case. More over, in most cases, you do not even need to add a new plugin. There is a way to configure Tigase to use a different database just for user authentication and you can even provide Tigase with SQL queries or stored procedures which it should use for authentication. This way you can have a completely custom database for user authentication data. |
|
If you are interested in this approach, I suggest you look at the documentation for more details: https://docs.tigase.net/en/latest/Tigase_Administration/Security/_Security.html?highlight=custom#custom-authentication-connectors |
|
thank |
|
But what if my external authentication system is not database-based |
|
You can implement new custom authentication repository and replace it instead of using |
|
thanks |
|
Hi @hantu85, I would like to ask something about custom authentication. Currently, I am integration xmpp server along side with external API existing system. Mobile get token from API server and token is stored in redis cache. I followed your instruction to make custom authentication with redis. Here is my custom authentication file and config.tdsl file. I have recompile tigase-server.jar file and rebuild docker for xmpp server but no using the custom one. https://gist.github.com/wailwinphyo2020/e34ed2aec6ef524161a247275235966e Can you suggest me the best way to do it? |
|
In your code you have: |
|
@woj-tek Thanks for advice! I have updated like this - |
|
After project clean up and updating that header help! Thanks @woj-tek for your advice! |
|
Great it worked. One thing I would recommend to ease with development and maintenance would be creating dedicated maven project with your code, build it (create jar file) and then, instead of rebulding tigase-server docker image, create one based on tigase-server |
Can I develop a plugin replacement tigase built in user management or authentication system
I expect to develop a plugin replacement tigase built-in user management and authentication system; the plugin will be connected to an external database. When an administrator adds a user to the APP or management page, the user's information is added to this external database