Lines 8-19
a try if your needs of mappings and transformations are low.
Link Here
|
8 |
|
8 |
|
9 |
=head3 How to reach the service |
9 |
=head3 How to reach the service |
10 |
|
10 |
|
11 |
What we need is build the url of the ldap service we want to reach. So ask him |
11 |
What we need is build the uri of the ldap service we want to reach. So ask him |
12 |
for the URL. If he don't know, ask for the scheme (or protocol), the hostname |
12 |
for the URL. If he don't know, ask for the scheme (or protocol), the hostname |
13 |
and the port of the directory. Only hostname and scheme are mandatory. |
13 |
and the port of the directory. Only hostname and scheme are mandatory. |
14 |
|
14 |
|
15 |
The scheme must be ldap or ldaps (ldaps is for crypted ldap, ldap over SSL). |
15 |
The scheme must be ldap or ldaps (ldaps is for crypted ldap, ldap over SSL). |
16 |
The url construction is: |
16 |
The uri construction is: |
17 |
|
17 |
|
18 |
scheme://hostname:port |
18 |
scheme://hostname:port |
19 |
scheme://hostname |
19 |
scheme://hostname |
Lines 49-65
First of all, you need to tell koha that ldap authentication is now relevant
Link Here
|
49 |
|
49 |
|
50 |
<useldapserver>1</useldapserver> |
50 |
<useldapserver>1</useldapserver> |
51 |
|
51 |
|
52 |
If you use anonymous method, you have to give credentials of koha account |
52 |
If you are using anonymous method, you just omit LDAP credentials |
53 |
|
53 |
|
54 |
<ldapserver url="ldap://directory.example.com" |
54 |
<ldapserver uri="ldap://directory.example.com" |
55 |
manager="uid=koha,ou=people,dc=example,dc=com" |
|
|
56 |
password="MYS3CRET" |
57 |
authmethod="search_dn" > |
55 |
authmethod="search_dn" > |
58 |
|
56 |
|
59 |
Also, you can set the values for replication and update (documented in legacy |
57 |
Also, you can set the values for replication and update (documented in legacy |
60 |
pod): |
58 |
pod): |
61 |
|
59 |
|
62 |
<ldapserver url="ldap://directory.example.com" |
60 |
<ldapserver uri="ldap://directory.example.com" |
63 |
manager="uid=koha,ou=people,dc=example,dc=com" |
61 |
manager="uid=koha,ou=people,dc=example,dc=com" |
64 |
password="MYS3CRET" |
62 |
password="MYS3CRET" |
65 |
authmethod="search_dn" |
63 |
authmethod="search_dn" |
Lines 69-75
pod):
Link Here
|
69 |
You must now tell koha the ldap branches where to find users |
67 |
You must now tell koha the ldap branches where to find users |
70 |
|
68 |
|
71 |
<useldapserver>1</useldapserver> |
69 |
<useldapserver>1</useldapserver> |
72 |
<ldapserver url="ldap://directory.example.com" |
70 |
<ldapserver uri="ldap://directory.example.com" |
73 |
manager="uid=koha,ou=people,dc=example,dc=com" |
71 |
manager="uid=koha,ou=people,dc=example,dc=com" |
74 |
password="MYS3CRET" |
72 |
password="MYS3CRET" |
75 |
authmethod="search_dn" |
73 |
authmethod="search_dn" |
Lines 85-91
sofisticated transformations directly in perl:
Link Here
|
85 |
|
83 |
|
86 |
<transformation module="C4::LDAPTransform::CustomTransform" /> |
84 |
<transformation module="C4::LDAPTransform::CustomTransform" /> |
87 |
|
85 |
|
88 |
This module only have to define a subroutine named get_borrower |
86 |
This module only have to define a subroutine named get_borrower which will |
|
|
87 |
receive C<Net::LDAP::Entry> object and returns hash which corresponds to |
88 |
fields in C<borrowers> table similar to: |
89 |
|
89 |
|
|
|
90 |
{ |
91 |
column => { |
92 |
email => "test.user\\@example.com", |
93 |
firstname => "Test", |
94 |
surname => "User" |
95 |
userid => "testuser", |
96 |
} |
97 |
} |
90 |
|
98 |
|
|
|
99 |
If you don't have <mapping> section in your C<kona-conf.xml> you will have |
100 |
to add additional attribute to your ldapserver directive to indicate which |
101 |
field will be used to bind to LDAP using <userid_from>: |
102 |
|
103 |
<ldapserver uri="ldap://directory.example.com" |
104 |
manager="uid=koha,ou=people,dc=example,dc=com" |
105 |
password="MYS3CRET" |
106 |
authmethod="search_dn" |
107 |
replicate="1" update="1" |
108 |
userid_from="uid" |
109 |
> |
91 |
|
110 |
|