Merge
This commit is contained in:
commit
4ab764558f
10 changed files with 191 additions and 47 deletions
|
@ -112,6 +112,10 @@ class Net::LDAP::PDU
|
|||
@ldap_result || {}
|
||||
end
|
||||
|
||||
def error_message
|
||||
result[:errorMessage] || ""
|
||||
end
|
||||
|
||||
##
|
||||
# This returns an LDAP result code taken from the PDU, but it will be nil
|
||||
# if there wasn't a result code. That can easily happen depending on the
|
||||
|
@ -120,6 +124,18 @@ class Net::LDAP::PDU
|
|||
@ldap_result and @ldap_result[code]
|
||||
end
|
||||
|
||||
def status
|
||||
result_code == 0 ? :success : :failure
|
||||
end
|
||||
|
||||
def success?
|
||||
status == :success
|
||||
end
|
||||
|
||||
def failure?
|
||||
!success?
|
||||
end
|
||||
|
||||
##
|
||||
# Return serverSaslCreds, which are only present in BindResponse packets.
|
||||
#--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue