1Catalyst::Model::LDAP(3U)ser Contributed Perl DocumentatiCoantalyst::Model::LDAP(3)
2
3
4

NAME

6       Catalyst::Model::LDAP - LDAP model class for Catalyst
7

SYNOPSIS

9           # Use the Catalyst helper
10           script/myapp_create.pl model Person LDAP ldap.ufl.edu ou=People,dc=ufl,dc=edu
11
12           # Or, in lib/MyApp/Model/Person.pm
13           package MyApp::Model::Person;
14
15           use base qw/Catalyst::Model::LDAP/;
16
17           __PACKAGE__->config(
18               host => 'ldap.ufl.edu',
19               base => 'ou=People,dc=ufl,dc=edu',
20           );
21
22           1;
23
24           # Then, in your controller
25           my $mesg = $c->model('Person')->search('(cn=Lou Rhodes)');
26           my @entries = $mesg->entries;
27           print $entries[0]->sn;
28

DESCRIPTION

30       This is the Net::LDAP model class for Catalyst.  It is nothing more
31       than a simple wrapper for Net::LDAP.
32
33       This class simplifies LDAP access by letting you configure a common set
34       of bind arguments.  It also lets you configure a base DN for searching.
35
36       Please refer to the Net::LDAP documentation for information on what
37       else is available.
38

CONFIGURATION

40       The following configuration parameters are supported:
41
42       ·   "host"
43
44           The LDAP server's fully qualified domain name (FQDN), e.g.
45           "ldap.ufl.edu".  Can also be an IP address, e.g. 127.0.0.1.
46
47       ·   "base"
48
49           The base distinguished name (DN) for searching the directory, e.g.
50           "ou=People,dc=ufl,dc=edu".
51
52       ·   "dn"
53
54           (Optional) The bind DN for connecting to the directory, e.g.
55           "dn=admin,dc=ufl,dc=edu".  This can be anyone that has permission
56           to search under the base DN, as per your LDAP server's access
57           control lists.
58
59       ·   "password"
60
61           (Optional) The password for the specified bind DN.
62
63       ·   "start_tls"
64
65           (Optional) Set to 1 to use TLS when binding to the LDAP server, for
66           secure connections.
67
68       ·   "start_tls_options"
69
70           (Optional) A hashref containing options to use when binding using
71           TLS to the LDAP server.
72
73       ·   "options"
74
75           (Optional) A hashref containing options to pass to "search" in
76           Catalyst::Model::LDAP::Connection.  For example, this can be used
77           to set a sizelimit.
78
79           NOTE: In previous versions, these options were passed to all
80           Net::LDAP methods.  This has changed to allow a cleaner connection
81           interface.  If you still require this behavior, create a class
82           inheriting from Catalyst::Model::LDAP::Connection that overrides
83           the specific methods and set "connection_class".
84
85       ·   "connection_class"
86
87           (Optional) The class or package name that wraps Net::LDAP.
88           Defaults to Catalyst::Model::LDAP::Connection.
89
90           See also "OVERRIDING METHODS" in Catalyst::Model::LDAP::Connection.
91
92       ·   "entry_class"
93
94           (Optional) The class or package name to rebless Net::LDAP::Entry
95           objects as.  Defaults to Catalyst::Model::LDAP::Entry.
96
97           See also "ADDING ENTRY METHODS" in Catalyst::Model::LDAP::Entry.
98

INTERNAL METHODS

100   ACCEPT_CONTEXT
101       Bind the client using the current configuration and return it.  This
102       method is automatically called when you use e.g. "$c->model('LDAP')".
103
104       See "bind" in Catalyst::Model::LDAP::Connection for information on how
105       the bind operation is done.
106

SEE ALSO

108       ·   Catalyst::Helper::Model::LDAP
109
110       ·   Catalyst::Model::LDAP::Connection
111
112       ·   Catalyst::Model::LDAP::Search
113
114       ·   Catalyst::Model::LDAP::Entry
115
116       ·   Catalyst
117
118       ·   Net::LDAP
119

AUTHORS

121       ·   Daniel Westermann-Clark <danieltwc@cpan.org>
122
123       ·   Adam Jacob <holoway@cpan.org> (TLS support)
124
125       ·   Marcus Ramberg (paging support and entry AUTOLOAD)
126

ACKNOWLEDGMENTS

128       ·   Salih Gonullu, for initial work on Catalyst mailing list
129

LICENSE

131       This library is free software; you can redistribute it and/or modify it
132       under the same terms as Perl itself.
133
134
135
136perl v5.12.0                      2008-02-21          Catalyst::Model::LDAP(3)
Impressum