class URI::LDAP
Constants
- COMPONENT
- DEFAULT_PORT
-
A Default port of 389 for
URI::LDAP. - SCOPE
-
Scopes available for the starting point.
-
SCOPE_BASE - the Base DN
-
SCOPE_ONE - one level under the Base DN, not including the base DN and not including any entries under this
-
SCOPE_SUB - subtrees, all entries at all levels
-
Public Class Methods
(Array[nil | String | Integer] args) → URI::LDAP
({ host: String?, port: Integer?, dn: String?, attributes: String?, scope: String?, filter: String?, extensions: String? }) → URI::LDAP
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 52
def self.build: (Array[nil | String | Integer] args) -> URI::LDAP
| ({ host: String?, port: Integer?, dn: String?, attributes: String?, scope: String?, filter: String?, extensions: String? }) -> URI::LDAP
Description
Creates 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:
uri = URI::LDAP.build({:host => 'ldap.example.com', :dn => '/dc=example'}) uri = URI::LDAP.build(["ldap.example.com", nil, "/dc=example;dc=com", "query", nil, nil, nil])
(String schema, String? userinfo, String host, Integer? port, String? registry, String? path, String? opaque, String query, String? fragment) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 74
def initialize: (String schema, String? userinfo, String host, Integer? port, String? registry, String? path, String? opaque, String query, String? fragment) -> void
Description
Creates 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, nil, "/dc=example;dc=com", nil, "query", nil)
See also URI::Generic.new.
Public Instance Methods
() → String
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 132
def attributes: () -> String
Returns attributes.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 148
def attributes=: (String val) -> String
Setter for attributes val.
() → String
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 100
def build_path_query: () -> String
Private method to assemble query from attributes, scope, filter, and extensions.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 108
def dn: () -> String
Returns dn.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 124
def dn=: (String val) -> String
Setter for dn val.
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 204
def extensions: () -> untyped
Returns extensions.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 220
def extensions=: (String val) -> String
Setter for extensions val.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 180
def filter: () -> String
Returns filter.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 196
def filter=: (String val) -> String
Setter for filter val.
() → ::FalseClass
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 228
def hierarchical?: () -> ::FalseClass
() → nil
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 82
def parse_dn: () -> nil
Private method to cleanup dn from using the path component attribute.
() → nil
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 91
def parse_query: () -> nil
Private method to cleanup attributes, scope, filter, and extensions from using the query component attribute.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 156
def scope: () -> String
Returns scope.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 172
def scope=: (String val) -> String
Setter for scope val.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 140
def set_attributes: (String val) -> String
Private setter for attributes val.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 116
def set_dn: (String val) -> String
Private setter for dn val.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/uri/0/ldap.rbs, line 212
def set_extensions: (String val) -> String
Private setter for extensions val.