- A
- B
- D
- E
- F
- H
- N
- S
DEFAULT_PORT | = | 389 |
A Default port of 389 for URI::LDAP |
||
COMPONENT | = | [ :scheme, :host, :port, :dn, :attributes, :scope, :filter, :extensions, ].freeze |
An Array of the available components for URI::LDAP |
||
SCOPE | = | [ SCOPE_ONE = 'one', SCOPE_SUB = 'sub', SCOPE_BASE = 'base', ].freeze |
Scopes available for the starting point.
|
Description
Create a new URI::LDAP object from components, with syntax checking.
The components accepted are host, port, dn, attributes, scope, filter, and extensions.
The components should be provided either as an Array, or as a Hash with keys formed by preceding the component names with a colon.
If an Array is used, the components must be passed in the order [host, port, dn, attributes, scope, filter, extensions].
Example:
newuri = URI::LDAP.build({:host => 'ldap.example.com',
:dn> => '/dc=example'})
newuri = URI::LDAP.build(["ldap.example.com", nil,
"/dc=example;dc=com", "query", nil, nil, nil])
# File lib/uri/ldap.rb, line 73 def self.build(args) tmp = Util::make_components_hash(self, args) if tmp[:dn] tmp[:path] = tmp[:dn] end query = [] [:extensions, :filter, :scope, :attributes].collect do |x| next if !tmp[x] && query.size == 0 query.unshift(tmp[x]) end tmp[:query] = query.join('?') return super(tmp) end
Description
Create a new URI::LDAP object from generic URI components as per RFC 2396. No LDAP-specific syntax checking is performed.
Arguments are scheme
, userinfo
,
host
, port
, registry
,
path
, opaque
, query
and
fragment
, in that order.
Example:
uri = URI::LDAP.new("ldap", nil, "ldap.example.com", nil,
"/dc=example;dc=com", "query", nil, nil, nil, nil)
See also URI::Generic.new
returns attributes.
setter for attributes val
setter for dn val
returns extensions.
setter for extensions val
returns filter.
setter for filter val
returns scope.
setter for scope val
private setter for attributes val
private setter for dn val
private setter for extensions val
private setter for filter val