【发布时间】:2019-08-30 04:09:28
【问题描述】:
我正在尝试集成 Tigase 以使用我的自定义 MySQL 数据库来验证用户、获取名册和 vCard。我按照https://docs.tigase.net/tigase-server/8.0.0/Administration_Guide/html/#customAuthentication 的描述设置了“自定义身份验证连接器”,但是,它似乎只对我已经添加到本地 Tigase 数据库的用户进行身份验证。 Tigase 是否可以在用户成功通过身份验证后自动创建用户?而且,如何设置 Tigase 以从我的自定义数据库中获取用户的名册和/或 vCard?
我已尝试按照https://docs.tigase.net/tigase-server/8.0.0/Administration_Guide/html/#customAuthentication 中的说明设置“自定义身份验证连接器”,但是,对于仅存在于我的自定义数据库中的用户,它允许登录,但在我尝试创建房间时抛出错误或将用户添加到我的名册中,如“tigase.db.UserNotFoundException:用户不存在”和“警告:数据包的 NotAuthorizedException”。
这是我使用的基于https://docs.tigase.net/tigase-server/8.0.0/Administration_Guide/html/#customAuthentication的配置:
authRepository {
default () {
cls = 'tigase.db.jdbc.TigaseCustomAuth'
'data-source' = 'db-custom'
'conn-valid-query' = 'select 1'
'user-account-status-query' = 'select onlineStatus AS account_status from tbl_contacts where id = ?'
'user-login-query' = "select vUserId AS user_id from tbl_contacts where vUserId = ? AND vPassword = ?"
}
}
我希望能够将 Tigase 与我的自定义数据库集成,以便它从我的数据库中进行身份验证、获取名册和 vcard 信息。
【问题讨论】: