XMPP with openfire 3 openfire Extension Test integration with existing users

Source: Internet
Author: User
Openfire server configuration. Skip the introduction first. Article When used in.

Openfire Extension Test integration with existing system users

If I want to use the user/group (department) of an existing system instead of using openfire to manage a set of users/groups, it is very convenient to use openfire to integrate existing system users.

Go to the openfire console-server-Service Manager-System Properties
You can find the following configurations:
Provider. Auth. classname
Org. jivesoftware. openfire. Auth. defaultauthprovider
* User verification
Provider. Group. classname
Org. jivesoftware. openfire. Group. defaultgroupprovider
* Obtain group-related data
Provider. User. classname
Org. jivesoftware. openfire. User. defaultuserprovider
* Getting user data
These providers are the Default User Groups managed by openfire.

Openfire also provides JDBC-related providers to obtain user/group data from other data sources.
Modify the preceding three attributes
Org. jivesoftware. openfire. Auth. jdbcauthprovider
Org. jivesoftware. openfire. Group. jdbcgroupprovider
Org. jivesoftware. openfire. User. jdbcuserprovider

Then, configure the data source and add the following attributes.
Jdbcprovider. Driver
* Data Source driver
Jdbcprovider. connectionstring
* Connection string

Configure related SQL statements and attributes for each JDBC provider (add a project to the system attribute)

Jdbcauthprovider
Jdbcauthprovider. passwordsql
* SQL statement for getting user passwords
* Input parameter: Logon Name
* Input column: Password
* Example: Select PWD from user where name =?
Jdbcauthprovider. passwordtype
* The password type can be plain (text), MD5, or sha1.
* If your password is not encrypted for the above three types, you need to provide an authprovider. The next chapter will introduce

Jdbcgroupprovider
Jdbcgroupprovider. allgroupssql
* Obtain the SQL statements of all groups.
* Input parameter: None
* Output column: Group Key
* Example: Select Sn from department

Jdbcgroupprovider. descriptionsql
* Get the group name (description)
* Input parameter: Key of the group record
* Output column: group name (description)
* Example: Select name from department where Sn =?

Jdbcgroupprovider. groupcountsql
* Obtain the number of groups.
* Input parameter: Group Key
* Output column: number of groups
* Example: Select count (SN) from department

Jdbcgroupprovider. loadadminssql
* Obtain the Group Administrator.
* Input parameter: Key of the group record
* Output column: Group Administrator's key
* Example: Select Admin from department where Sn =?

Jdbcgroupprovider. loadmemberssql
* Get group members
* Input parameter: Group Key
* Output column: group member key (SET)
* Example: Select usersn from department_user where departmentsn =?

Jdbcgroupprovider. usergroupssql
* Obtain a group of Members.
* Input parameter: Member key
* Output column: Key of the member group
* Example: Select departmentsn from department_user where usersn =?

Jdbcuserprovider
Jdbcuserprovider. alluserssql
* Retrieve all users
* Input parameter: None
* Output column: User's key
* Example: Select Sn from user

Jdbcuserprovider. usercountsql
* Obtain the number of all users
* Input parameter: None
* Output column: Number of users
* Example: Select count (SN) from user

Jdbcuserprovider. loadusersql
* Getting user information
* Input parameter: User's key
* Output column: Login Name, name, and email (at least these three columns should be used below)
* Example: Select loginname, name, email from user where Sn =?

Jdbcuserprovider. emailfield
* Name of the user's email column, for example, email
Jdbcuserprovider. namefield
* The column name of the specified user name, for example, name.
Jdbcuserprovider. usernamefield
* The name of the specified user login name, for example, loginname

Finally, you need to configure a new administrator user.
Admin. authorizedjids
* Specify the administrator user in the new data source. Note that the complete jid (user @ domain name) is used)
* Example: admin@server.cn

Restart openfire After configuring the above attributes
Use the username in Admin. authorizedjids to log on to the openfire console.
If the configuration is successful, go to the openfire console-user/group
You can see the user/group information in your data source.
You can also use spark to log on for testing.

In addition, if a problem occurs during debugging, you cannot log on to the openfire console.
You can directly modify the ofproperty table in the openfire database.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.