mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
This commit is contained in:
parent
e87d332394
commit
725af2de45
216
doc/guide.tex
216
doc/guide.tex
@ -5149,15 +5149,15 @@ consists of the following \modvcardldap{}-specific options:
|
|||||||
\begin{description}
|
\begin{description}
|
||||||
\hostitem{vjud}
|
\hostitem{vjud}
|
||||||
\iqdiscitem{\ns{vcard-temp}}
|
\iqdiscitem{\ns{vcard-temp}}
|
||||||
\titem{\{search, true|false\}}\ind{options!search}This option specifies whether the search
|
\titem{search: true|false}\ind{options!search}This option specifies whether the search
|
||||||
functionality is enabled (value: \term{true}) or disabled (value:
|
functionality is enabled (value: \term{true}) or disabled (value:
|
||||||
\term{false}). If disabled, the option \term{host} will be ignored and the
|
\term{false}). If disabled, the option \term{host} will be ignored and the
|
||||||
\Jabber{} User Directory service will not appear in the Service Discovery item
|
\Jabber{} User Directory service will not appear in the Service Discovery item
|
||||||
list. The default value is \term{true}.
|
list. The default value is \term{true}.
|
||||||
\titem{\{matches, infinity|Number\}}\ind{options!matches}With this option, the number of reported
|
\titem{matches: infinity|Number}\ind{options!matches}With this option, the number of reported
|
||||||
search results can be limited. If the option's value is set to \term{infinity},
|
search results can be limited. If the option's value is set to \term{infinity},
|
||||||
all search results are reported. The default value is \term{30}.
|
all search results are reported. The default value is \term{30}.
|
||||||
\titem{\{ldap\_vcard\_map, [ \{Name, Pattern, LDAPattributes\}, ...]\}} \ind{options!ldap\_vcard\_map}
|
\titem{ldap\_vcard\_map: \{ Name: \{Pattern, LDAPattributes\}, ...\}} \ind{options!ldap\_vcard\_map}
|
||||||
With this option you can set the table that maps LDAP attributes to vCard fields.
|
With this option you can set the table that maps LDAP attributes to vCard fields.
|
||||||
\ind{protocols!RFC 2426: vCard MIME Directory Profile}
|
\ind{protocols!RFC 2426: vCard MIME Directory Profile}
|
||||||
\term{Name} is the type name of the vCard as defined in
|
\term{Name} is the type name of the vCard as defined in
|
||||||
@ -5172,48 +5172,48 @@ consists of the following \modvcardldap{}-specific options:
|
|||||||
and \term{"\%d"} will be replaced with the domain part of a JID.
|
and \term{"\%d"} will be replaced with the domain part of a JID.
|
||||||
The default is:
|
The default is:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
[{"NICKNAME", "%u", []},
|
"NICKNAME": {"%u": []}
|
||||||
{"FN", "%s", ["displayName"]},
|
"FN": {"%s": ["displayName"]}
|
||||||
{"LAST", "%s", ["sn"]},
|
"LAST": {"%s": ["sn"]}
|
||||||
{"FIRST", "%s", ["givenName"]},
|
"FIRST": {"%s": ["givenName"]}
|
||||||
{"MIDDLE", "%s", ["initials"]},
|
"MIDDLE": {"%s": ["initials"]}
|
||||||
{"ORGNAME", "%s", ["o"]},
|
"ORGNAME": {"%s": ["o"]}
|
||||||
{"ORGUNIT", "%s", ["ou"]},
|
"ORGUNIT": {"%s": ["ou"]}
|
||||||
{"CTRY", "%s", ["c"]},
|
"CTRY": {"%s": ["c"]}
|
||||||
{"LOCALITY", "%s", ["l"]},
|
"LOCALITY": {"%s": ["l"]}
|
||||||
{"STREET", "%s", ["street"]},
|
"STREET": {"%s": ["street"]}
|
||||||
{"REGION", "%s", ["st"]},
|
"REGION": {"%s": ["st"]}
|
||||||
{"PCODE", "%s", ["postalCode"]},
|
"PCODE": {"%s": ["postalCode"]}
|
||||||
{"TITLE", "%s", ["title"]},
|
"TITLE": {"%s": ["title"]}
|
||||||
{"URL", "%s", ["labeleduri"]},
|
"URL": {"%s": ["labeleduri"]}
|
||||||
{"DESC", "%s", ["description"]},
|
"DESC": {"%s": ["description"]}
|
||||||
{"TEL", "%s", ["telephoneNumber"]},
|
"TEL": {"%s": ["telephoneNumber"]}
|
||||||
{"EMAIL", "%s", ["mail"]},
|
"EMAIL": {"%s": ["mail"]}
|
||||||
{"BDAY", "%s", ["birthDay"]},
|
"BDAY": {"%s": ["birthDay"]}
|
||||||
{"ROLE", "%s", ["employeeType"]},
|
"ROLE": {"%s": ["employeeType"]}
|
||||||
{"PHOTO", "%s", ["jpegPhoto"]}]
|
"PHOTO": {"%s": ["jpegPhoto"]}
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
\titem{\{ldap\_search\_fields, [ \{Name, Attribute\}, ...]\}}\ind{options!ldap\_search\_fields}This option
|
\titem{ldap\_search\_fields: \{ Name: Attribute, ...\}}\ind{options!ldap\_search\_fields}This option
|
||||||
defines the search form and the LDAP attributes to search within.
|
defines the search form and the LDAP attributes to search within.
|
||||||
\term{Name} is the name of a search form
|
\term{Name} is the name of a search form
|
||||||
field which will be automatically translated by using the translation
|
field which will be automatically translated by using the translation
|
||||||
files (see \term{msgs/*.msg} for available words). \term{Attribute} is the
|
files (see \term{msgs/*.msg} for available words). \term{Attribute} is the
|
||||||
LDAP attribute or the pattern \term{"\%u"}. The default is:
|
LDAP attribute or the pattern \term{"\%u"}. The default is:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
[{"User", "%u"},
|
"User": "%u"
|
||||||
{"Full Name", "displayName"},
|
"Full Name": "displayName"
|
||||||
{"Given Name", "givenName"},
|
"Given Name": "givenName"
|
||||||
{"Middle Name", "initials"},
|
"Middle Name": "initials"
|
||||||
{"Family Name", "sn"},
|
"Family Name": "sn"
|
||||||
{"Nickname", "%u"},
|
"Nickname": "%u"
|
||||||
{"Birthday", "birthDay"},
|
"Birthday": "birthDay"
|
||||||
{"Country", "c"},
|
"Country": "c"
|
||||||
{"City", "l"},
|
"City": "l"
|
||||||
{"Email", "mail"},
|
"Email": "mail"
|
||||||
{"Organization Name", "o"},
|
"Organization Name": "o"
|
||||||
{"Organization Unit", "ou"}]
|
"Organization Unit": "ou"
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
\titem{\{ldap\_search\_reported, [ \{SearchField, VcardField\}, ...]\}}\ind{options!ldap\_search\_reported}This option
|
\titem{ldap\_search\_reported: \{ SearchField: VcardField, ...\}}\ind{options!ldap\_search\_reported}This option
|
||||||
defines which search fields should be reported.
|
defines which search fields should be reported.
|
||||||
\term{SearchField} is the name of a search form
|
\term{SearchField} is the name of a search form
|
||||||
field which will be automatically translated by using the translation
|
field which will be automatically translated by using the translation
|
||||||
@ -5221,17 +5221,17 @@ consists of the following \modvcardldap{}-specific options:
|
|||||||
vCard field name defined in the \option{ldap\_vcard\_map} option. The default
|
vCard field name defined in the \option{ldap\_vcard\_map} option. The default
|
||||||
is:
|
is:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
[{"Full Name", "FN"},
|
"Full Name": "FN"
|
||||||
{"Given Name", "FIRST"},
|
"Given Name": "FIRST"
|
||||||
{"Middle Name", "MIDDLE"},
|
"Middle Name": "MIDDLE"
|
||||||
{"Family Name", "LAST"},
|
"Family Name": "LAST"
|
||||||
{"Nickname", "NICKNAME"},
|
"Nickname": "NICKNAME"
|
||||||
{"Birthday", "BDAY"},
|
"Birthday": "BDAY"
|
||||||
{"Country", "CTRY"},
|
"Country": "CTRY"
|
||||||
{"City", "LOCALITY"},
|
"City": "LOCALITY"
|
||||||
{"Email", "EMAIL"},
|
"Email": "EMAIL"
|
||||||
{"Organization Name", "ORGNAME"},
|
"Organization Name": "ORGNAME"
|
||||||
{"Organization Unit", "ORGUNIT"}]
|
"Organization Unit": "ORGUNIT"
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
\end{description}
|
\end{description}
|
||||||
|
|
||||||
@ -5247,12 +5247,13 @@ infos in \term{"ou=AddressBook,dc=example,dc=org"} directory. Corresponding
|
|||||||
authentication section should looks like this:
|
authentication section should looks like this:
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
%% authentication method
|
## authentication method
|
||||||
{auth_method, ldap}.
|
auth_method: ldap
|
||||||
%% DNS name of our LDAP server
|
## DNS name of our LDAP server
|
||||||
{ldap_servers, ["ldap.example.org"]}.
|
ldap_servers:
|
||||||
%% We want to authorize users from 'shadowAccount' object class only
|
- "ldap.example.org"
|
||||||
{ldap_filter, "(objectClass=shadowAccount)"}.
|
## We want to authorize users from 'shadowAccount' object class only
|
||||||
|
ldap_filter: "(objectClass=shadowAccount)"
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
Now we want to use users LDAP-info as their vCards. We have four attributes
|
Now we want to use users LDAP-info as their vCards. We have four attributes
|
||||||
@ -5261,47 +5262,39 @@ defined in our LDAP schema: \term{"mail"} --- email address, \term{"givenName"}
|
|||||||
Also we want users to search each other. Let's see how we can set it up:
|
Also we want users to search each other. Let's see how we can set it up:
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
{modules,
|
modules:
|
||||||
...
|
mod_vcard_ldap:
|
||||||
{mod_vcard_ldap,
|
## We use the same server and port, but want to bind anonymously because
|
||||||
[
|
## our LDAP server accepts anonymous requests to
|
||||||
%% We use the same server and port, but want to bind anonymously because
|
## "ou=AddressBook,dc=example,dc=org" subtree.
|
||||||
%% our LDAP server accepts anonymous requests to
|
ldap_rootdn: ""
|
||||||
%% "ou=AddressBook,dc=example,dc=org" subtree.
|
ldap_password: ""
|
||||||
{ldap_rootdn, ""},
|
## define the addressbook's base
|
||||||
{ldap_password, ""},
|
ldap_base: "ou=AddressBook,dc=example,dc=org"
|
||||||
%% define the addressbook's base
|
## uidattr: user's part of JID is located in the "mail" attribute
|
||||||
{ldap_base, "ou=AddressBook,dc=example,dc=org"},
|
## uidattr_format: common format for our emails
|
||||||
%% uidattr: user's part of JID is located in the "mail" attribute
|
ldap_uids: {"mail": "%u@mail.example.org"}
|
||||||
%% uidattr_format: common format for our emails
|
## Now we want to define vCard pattern
|
||||||
{ldap_uids, [{"mail","%u@mail.example.org"}]},
|
ldap_vcard_map:
|
||||||
%% We have to define empty filter here, because entries in addressbook does not
|
"NICKNAME": {"%u": []} # just use user's part of JID as his nickname
|
||||||
%% belong to shadowAccount object class
|
"FIRST": {"%s": ["givenName"]}
|
||||||
{ldap_filter, ""},
|
"LAST": {"%s": ["sn"]}
|
||||||
%% Now we want to define vCard pattern
|
"FN": {"%s, %s": ["sn", "givenName"]} # example: "Smith, John"
|
||||||
{ldap_vcard_map,
|
"EMAIL": {"%s": ["mail"]}
|
||||||
[{"NICKNAME", "%u", []}, % just use user's part of JID as his nickname
|
"BDAY": {"%s": ["birthDay"]}
|
||||||
{"FIRST", "%s", ["givenName"]},
|
## Search form
|
||||||
{"LAST", "%s", ["sn"]},
|
ldap_search_fields:
|
||||||
{"FN", "%s, %s", ["sn", "givenName"]}, % example: "Smith, John"
|
"User": "%u"
|
||||||
{"EMAIL", "%s", ["mail"]},
|
"Name": "givenName"
|
||||||
{"BDAY", "%s", ["birthDay"]}]},
|
"Family Name": "sn"
|
||||||
%% Search form
|
"Email": "mail"
|
||||||
{ldap_search_fields,
|
"Birthday": "birthDay"
|
||||||
[{"User", "%u"},
|
## vCard fields to be reported
|
||||||
{"Name", "givenName"},
|
## Note that JID is always returned with search results
|
||||||
{"Family Name", "sn"},
|
ldap_search_reported:
|
||||||
{"Email", "mail"},
|
"Full Name": "FN"
|
||||||
{"Birthday", "birthDay"}]},
|
"Nickname": "NICKNAME"
|
||||||
%% vCard fields to be reported
|
"Birthday": "BDAY"
|
||||||
%% Note that JID is always returned with search results
|
|
||||||
{ldap_search_reported,
|
|
||||||
[{"Full Name", "FN"},
|
|
||||||
{"Nickname", "NICKNAME"},
|
|
||||||
{"Birthday", "BDAY"}]}
|
|
||||||
]}
|
|
||||||
...
|
|
||||||
}.
|
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
Note that \modvcardldap{} module checks an existence of the user before
|
Note that \modvcardldap{} module checks an existence of the user before
|
||||||
@ -5309,30 +5302,27 @@ searching his info in LDAP.
|
|||||||
|
|
||||||
\item \term{ldap\_vcard\_map} example:
|
\item \term{ldap\_vcard\_map} example:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
{ldap_vcard_map,
|
ldap_vcard_map:
|
||||||
[{"NICKNAME", "%u", []},
|
"NICKNAME": {"%u": []} # just use user's part of JID as his nickname
|
||||||
{"FN", "%s", ["displayName"]},
|
"FN": {"%s": ["displayName"]}
|
||||||
{"CTRY", "Russia", []},
|
"CTRY": {"Russia": []}
|
||||||
{"EMAIL", "%u@%d", []},
|
"EMAIL": {"%u@%d": []}
|
||||||
{"DESC", "%s\n%s", ["title", "description"]}
|
"DESC": {"%s\n%s": ["title", "description"]}
|
||||||
]},
|
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
\item \term{ldap\_search\_fields} example:
|
\item \term{ldap\_search\_fields} example:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
{ldap_search_fields,
|
ldap_search_fields:
|
||||||
[{"User", "uid"},
|
"User": "uid"
|
||||||
{"Full Name", "displayName"},
|
"Full Name": "displayName"
|
||||||
{"Email", "mail"}
|
"Email": "mail"
|
||||||
]},
|
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
\item \term{ldap\_search\_reported} example:
|
\item \term{ldap\_search\_reported} example:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
{ldap_search_reported,
|
ldap_search_reported:
|
||||||
[{"Full Name", "FN"},
|
"Full Name": "FN"
|
||||||
{"Email", "EMAIL"},
|
"Email": "EMAIL"
|
||||||
{"Birthday", "BDAY"},
|
"Birthday": "BDAY"
|
||||||
{"Nickname", "NICKNAME"}
|
"Nickname": "NICKNAME"
|
||||||
]},
|
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user