"Translation" Ejabberd use of external scripts

Source: Internet
Author: User

External scripts

In this authentication module, when Ejabberd is started, it launches a script to invoke its authentication task.

The service administrator can use any of the language to write external scripts, and the interface details between Ejabberd and scripts are described in the Ejabberd Development Guide. There are also instances of authentication scripts here. Links: Https://www.ejabberd.im/extauth

Here are some special options:

Extauth_program:pathtoscript

This option represents the full path of the external script. The script must be ejabberd capable of executing.

Extauth_instances:integer

Represents the number of script instances that run authentication requests concurrently in the virtual host, with a minimum of 1 default values.

extauth_cache:false| CacheTime Integer

The default value is false to disable caching, the value is 0 to turn on the statistical cache, but not to use its cached information to authenticate users, if set other values, then turn on statistics and authentication two: Cachetimeinteger represents the number of seconds Ejabberd can reuse authentication information, Because the user has disconnected, to re-authenticate the user, do not have to re-query the external authentication script.

Note: In a host if the internal authentication is initiated the cache should not be enabled. If the cache is enabled, Mod_last must also be enabled in its vhost.

Instance

This external authentication is set up, external script, open cache for 10 minutes, and 3 script instances are declared for each virtual host in Ejabberd.

Auth_method: [External]

Extauth_program: "/etc/ejabberd/jabberauth.class.php"

extauth_cache:600

Extauth_instances:3

The configuration of external authentication is done after the official instance configuration, and all we need to do is write the external script.

"Translation" Ejabberd use of external scripts

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.