File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -709,6 +709,23 @@ def search args = {}
709
709
# p ldap.get_operation_result
710
710
# end
711
711
#
712
+ # Here's a more succinct example which does exactly the same thing, but
713
+ # collects all the required parameters into arguments:
714
+ #
715
+ # require 'net/ldap'
716
+ # ldap = Net::LDAP.new( :host=>your_server_ip_address, :port=>389 )
717
+ # if ldap.bind( :method=>:simple, :username=>your_user_name, :password=>your_user_password )
718
+ # # authentication succeeded
719
+ # else
720
+ # # authentication failed
721
+ # p ldap.get_operation_result
722
+ # end
723
+ #
724
+ # You don't need to pass a user-password as a String object to bind. You can
725
+ # also pass a Ruby Proc object which returns a string. This will cause bind to
726
+ # execute the Proc (which might then solicit input from a user with console display
727
+ # suppressed). The String value returned from the Proc is used as the password.
728
+ #
712
729
# You don't have to create a new instance of Net::LDAP every time
713
730
# you perform a binding in this way. If you prefer, you can cache the Net::LDAP object
714
731
# and re-use it to perform subsequent bindings, <i>provided</i> you call
You can’t perform that action at this time.
0 commit comments