struct LDAP::Entry

Overview

A single search result: its distinguished name plus its attributes.

Attribute values are stored as raw Bytes — LDAP octet strings are not necessarily UTF-8 (e.g. objectGUID, userCertificate). Use #[] for the common text case (decoded as a String) and #bytes for binary attributes.

Defined in:

ldap/entry.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(dn : String, attributes : Hash(String, Array(Bytes))) #

[View source]

Instance Method Detail

def [](key : String) : Array(String) #

The values of key decoded as strings. Raises KeyError if absent.


[View source]
def []?(key : String) : Array(String) | Nil #

The values of key decoded as strings, or nil if the attribute is absent.


[View source]
def attributes : Hash(String, Array(Bytes)) #

[View source]
def bytes(key : String) : Array(Bytes) #

The raw byte values of key (for binary attributes). Raises if absent.


[View source]
def dn : String #

[View source]
def has_attribute?(key : String) : Bool #

[View source]
def keys : Array(String) #

The attribute names present on this entry.


[View source]