man-pages/man3/URI::ldap.3pm.html
2021-03-31 01:06:50 +01:00

162 lines
4.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of URI::ldap</TITLE>
</HEAD><BODY>
<H1>URI::ldap</H1>
Section: User Contributed Perl Documentation (3pm)<BR>Updated: 2020-02-08<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
URI::ldap - LDAP Uniform Resource Locators
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<PRE>
use URI;
$uri = URI-&gt;new(&quot;ldap:$uri_string&quot;);
$dn = $uri-&gt;dn;
$filter = $uri-&gt;filter;
@attr = $uri-&gt;attributes;
$scope = $uri-&gt;scope;
%extn = $uri-&gt;extensions;
$uri = URI-&gt;new(&quot;ldap:&quot;); # start empty
$uri-&gt;host(&quot;ldap.itd.umich.edu&quot;);
$uri-&gt;dn(&quot;o=University of Michigan,c=US&quot;);
$uri-&gt;attributes(qw(postalAddress));
$uri-&gt;scope('sub');
$uri-&gt;filter('(cn=Babs Jensen)');
print $uri-&gt;as_string,&quot;\n&quot;;
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<TT>&quot;URI::ldap&quot;</TT> provides an interface to parse an <FONT SIZE="-1">LDAP URI</FONT> into its
constituent parts and also to build a <FONT SIZE="-1">URI</FONT> as described in
<FONT SIZE="-1">RFC 2255.</FONT>
<A NAME="lbAE">&nbsp;</A>
<H2>METHODS</H2>
<TT>&quot;URI::ldap&quot;</TT> supports all the generic and server methods defined by
<FONT SIZE="-1">URI</FONT>, plus the following.
<P>
Each of the following methods can be used to set or get the value in
the <FONT SIZE="-1">URI.</FONT> The values are passed in unescaped form. None of these
return undefined values, but elements without a default can be empty.
If arguments are given, then a new value is set for the given part
of the <FONT SIZE="-1">URI.</FONT>
<DL COMPACT>
<DT id="1">$uri-&gt;dn( [$new_dn] )<DD>
Sets or gets the <I>Distinguished Name</I> part of the <FONT SIZE="-1">URI.</FONT> The <FONT SIZE="-1">DN</FONT>
identifies the base object of the <FONT SIZE="-1">LDAP</FONT> search.
<DT id="2">$uri-&gt;attributes( [@new_attrs] )<DD>
Sets or gets the list of attribute names which are
returned by the search.
<DT id="3">$uri-&gt;scope( [$new_scope] )<DD>
Sets or gets the scope to be used by the search. The value can be one of
<TT>&quot;base&quot;</TT>, <TT>&quot;one&quot;</TT> or <TT>&quot;sub&quot;</TT>. If none is given in the <FONT SIZE="-1">URI</FONT> then the
return value defaults to <TT>&quot;base&quot;</TT>.
<DT id="4">$uri-&gt;_scope( [$new_scope] )<DD>
Same as <B>scope()</B>, but does not default to anything.
<DT id="5">$uri-&gt;filter( [$new_filter] )<DD>
Sets or gets the filter to be used by the search. If none is given in
the <FONT SIZE="-1">URI</FONT> then the return value defaults to <TT>&quot;(objectClass=*)&quot;</TT>.
<DT id="6">$uri-&gt;_filter( [$new_filter] )<DD>
Same as <B>filter()</B>, but does not default to anything.
<DT id="7">$uri-&gt;extensions( [$etype =&gt; $evalue,...] )<DD>
Sets or gets the extensions used for the search. The list passed should
be in the form etype1 =&gt; evalue1, etype2 =&gt; evalue2,... This is also
the form of list that is returned.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>SEE ALSO</H2>
&lt;<A HREF="http://tools.ietf.org/html/rfc2255">http://tools.ietf.org/html/rfc2255</A>&gt;
<A NAME="lbAG">&nbsp;</A>
<H2>AUTHOR</H2>
Graham Barr &lt;<I><A HREF="mailto:gbarr@pobox.com">gbarr@pobox.com</A></I>&gt;
<P>
Slightly modified by Gisle Aas to fit into the <FONT SIZE="-1">URI</FONT> distribution.
<A NAME="lbAH">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copyright (c) 1998 Graham Barr. All rights reserved. This program is
free software; you can redistribute it and/or modify it under the same
terms as Perl itself.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="8"><A HREF="#lbAB">NAME</A><DD>
<DT id="9"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="10"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="11"><A HREF="#lbAE">METHODS</A><DD>
<DT id="12"><A HREF="#lbAF">SEE ALSO</A><DD>
<DT id="13"><A HREF="#lbAG">AUTHOR</A><DD>
<DT id="14"><A HREF="#lbAH">COPYRIGHT</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:59 GMT, March 31, 2021
</BODY>
</HTML>