class LDAP::Request

Defined in:

ldap/request.cr:4
ldap/request.cr:8

Constant Summary

DELETE_TREE = "1.2.840.113556.1.4.805"
PAGED_RESULTS = "1.2.840.113556.1.4.319"
SORT_REQUEST = "1.2.840.113556.1.4.473"
SORT_RESPONSE = "1.2.840.113556.1.4.474"
START_TLS_OID = "1.3.6.1.4.1.1466.20037"

Instance Method Summary

Instance Method Detail

def add(dn : String, attributes : Hash(String, Array(String))) #

https://tools.ietf.org/html/rfc4511#section-4.7


[View source]
def authenticate(username : String = "", password : String = "") #

[View source]
def build(request : BER, controls : BER | Nil = nil, message_id = next_message_id) #

[View source]
def compare(dn : String, attribute : String, value : String) #

https://tools.ietf.org/html/rfc4511#section-4.10


[View source]
def delete(dn : String) #

https://tools.ietf.org/html/rfc4511#section-4.8


[View source]
def encode_paged_control(size : Int, cookie : Bytes) : BER #

RFC 2696 Simple Paged Results control. cookie is the opaque cookie from the previous page (empty on the first request); size is the requested page size.


[View source]
def encode_sort_controls(*sort_controls : String | SortControl) #

[View source]
def modify(dn : String, changes : Enumerable(Modification)) #

https://tools.ietf.org/html/rfc4511#section-4.6


[View source]
def modify_dn(dn : String, new_rdn : String, delete_old_rdn : Bool = true, new_superior : String | Nil = nil) #

https://tools.ietf.org/html/rfc4511#section-4.9


[View source]
def next_message_id #

Message IDs run from 1 to Int32::MAX and wrap back to 1. RFC 4511 ยง4.1.1.1: "The message ID of zero is reserved for unsolicited notifications and MUST NOT be used in any other request."


[View source]
def search(base : String, filter : Filter | String = Filter.equal("objectClass", "*"), scope : SearchScope = SearchScope::WholeSubtree, attributes : Enumerable(String) | Enumerable(Symbol) = [] of String, attributes_only : Bool = false, dereference : DereferenceAliases = DereferenceAliases::Always, size : Int = 0, time : Int = 0, sort : String | SortControl | BER | Nil = nil, page_size : Int | Nil = nil, cookie : Bytes = Bytes.empty) #

base: https://tools.ietf.org/html/rfc4511#section-4.5.1.1 filter: https://tools.ietf.org/html/rfc4511#section-4.5.1.7 scope: https://tools.ietf.org/html/rfc4511#section-4.5.1.2 attrs: https://tools.ietf.org/html/rfc4511#section-4.5.1.8 attrs_only: https://tools.ietf.org/html/rfc4511#section-4.5.1.6 deref: https://tools.ietf.org/html/rfc4511#section-4.5.1.3 size: https://tools.ietf.org/html/rfc4511#section-4.5.1.4 time: https://tools.ietf.org/html/rfc4511#section-4.5.1.5


[View source]
def start_tls #

[View source]
def unbind #

https://tools.ietf.org/html/rfc4511#section-4.3


[View source]