Skip to content

Commit ac729dd

Browse files
committed
Net::LDAP::Connection#bind is abolihsed
1 parent 585ae82 commit ac729dd

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

lib/net/ldap/connection.rb

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -265,35 +265,6 @@ def bind(auth)
265265
end
266266
end
267267

268-
#--
269-
# Implements a simple user/psw authentication. Accessed by calling #bind
270-
# with a method of :simple or :anonymous.
271-
#++
272-
def bind_simple(auth)
273-
user, psw = if auth[:method] == :simple
274-
[auth[:username] || auth[:dn], auth[:password]]
275-
else
276-
["", ""]
277-
end
278-
279-
raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless (user && psw)
280-
281-
message_id = next_msgid
282-
request = [
283-
LdapVersion.to_ber, user.to_ber,
284-
psw.to_ber_contextspecific(0)
285-
].to_ber_appsequence(Net::LDAP::PDU::BindRequest)
286-
287-
write(request, nil, message_id)
288-
pdu = queued_read(message_id)
289-
290-
if !pdu || pdu.app_tag != Net::LDAP::PDU::BindResult
291-
raise Net::LDAP::NoBindResultError, "no bind result"
292-
end
293-
294-
pdu
295-
end
296-
297268
#--
298269
# Required parameters: :mechanism, :initial_credential and
299270
# :challenge_response

0 commit comments

Comments
 (0)