Module: ROM::LDAP::Directory::Root
- Included in:
- ROM::LDAP::Directory
- Defined in:
- lib/rom/ldap/directory/root.rb
Instance Method Summary collapse
- #contexts ⇒ String
-
#schema_attribute_types ⇒ Array<String>
Query directory for all known attribute types.
-
#schema_object_classes ⇒ Array<String>
Object classes known by directory.
-
#sub_schema_entry ⇒ String
Distinguished name of subschema.
- #supported_controls ⇒ Array<String>
- #supported_extensions ⇒ Array<String>
- #supported_features ⇒ Array<String>
- #supported_mechanisms ⇒ Array<String>
- #supported_versions ⇒ Array<Integer>
-
#type ⇒ Symbol
Identify the LDAP server vendor, type determines vendor extension to load.
- #vendor ⇒ Array<String>
- #vendor_name ⇒ String
- #vendor_version ⇒ String
Instance Method Details
#contexts ⇒ String
122 123 124 |
# File 'lib/rom/ldap/directory/root.rb', line 122 def contexts root['namingContexts'].sort end |
#schema_attribute_types ⇒ Array<String>
Query directory for all known attribute types
80 81 82 |
# File 'lib/rom/ldap/directory/root.rb', line 80 def schema_attribute_types sub_schema['attributeTypes'].sort end |
#schema_object_classes ⇒ Array<String>
Returns Object classes known by directory.
71 72 73 |
# File 'lib/rom/ldap/directory/root.rb', line 71 def schema_object_classes sub_schema['objectClasses'].sort end |
#sub_schema_entry ⇒ String
Distinguished name of subschema
64 65 66 |
# File 'lib/rom/ldap/directory/root.rb', line 64 def sub_schema_entry root.first('subschemaSubentry') end |
#supported_controls ⇒ Array<String>
94 95 96 |
# File 'lib/rom/ldap/directory/root.rb', line 94 def supported_controls root['supportedControl'].sort end |
#supported_extensions ⇒ Array<String>
87 88 89 |
# File 'lib/rom/ldap/directory/root.rb', line 87 def supported_extensions root['supportedExtension'].sort end |
#supported_features ⇒ Array<String>
108 109 110 |
# File 'lib/rom/ldap/directory/root.rb', line 108 def supported_features root['supportedFeatures'].sort end |
#supported_mechanisms ⇒ Array<String>
101 102 103 |
# File 'lib/rom/ldap/directory/root.rb', line 101 def supported_mechanisms root['supportedSASLMechanisms'].sort end |
#supported_versions ⇒ Array<Integer>
115 116 117 |
# File 'lib/rom/ldap/directory/root.rb', line 115 def supported_versions root['supportedLDAPVersion'].sort.map(&:to_i) end |
#type ⇒ Symbol
Identify the LDAP server vendor, type determines vendor extension to load.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/rom/ldap/directory/root.rb', line 15 def type case root.first('vendorName') when /389/ then :three_eight_nine when /Apache/ then :apache_ds when /Apple/ then :open_directory when /ForgeRock/ then :open_dj when /IBM/ then :ibm when /Netscape/ then :netscape when /Novell/ then :e_directory when /Oracle/ then :open_ds when /Sun/ then :sun_microsystems when nil return :active_directory if ad? return :open_ldap if od? else :unknown end end |
#vendor ⇒ Array<String>
55 56 57 |
# File 'lib/rom/ldap/directory/root.rb', line 55 def vendor [vendor_name, vendor_version] end |
#vendor_name ⇒ String
37 38 39 |
# File 'lib/rom/ldap/directory/root.rb', line 37 def vendor_name root.first('vendorName') end |
#vendor_version ⇒ String
44 45 46 |
# File 'lib/rom/ldap/directory/root.rb', line 44 def vendor_version root.first('vendorVersion') end |