lib/portus/ldap/connection.rb
def bind_as(connection, cfg)
        raise ::Portus::LDAP::Error, "LDAP is disabled" unless cfg.enabled?
        raise ::Portus::LDAP::Error, "Some parameters are missing" unless cfg.initialized?

        res = connection.bind_as(bind_options(cfg))
        logged_error_message!(connection, cfg.username) unless res
        res
      end
# Bind to the LDAP server with the given configuration by using the given
# connection. Returns true if everything went alright, false otherwise. On
# failure it will also log the error and call `fail!`.
#
# It will raise a ::Portus::LDAP::Error exception if the given
# configuration is incomplete (e.g. missing parameters) or LDAP is
# disabled. It might also raise a Net::LDAP::Error since in the end this
# method calls `#bind_as` from Net::LDAP.
Bind to the LDAP server with the given configuration by using the given
connection. Returns true if everything went alright, false otherwise. On
failure it will also log the error and call `fail!`.


Bind to the LDAP server with the given configuration by using the given connection . Returns true if everything went alright false otherwise . On failure it will also log the error and call ` fail! ` .
def bind_as(connection, cfg)
        raise ::Portus::LDAP::Error, "LDAP is disabled" unless cfg.enabled?
        raise ::Portus::LDAP::Error, "Some parameters are missing" unless cfg.initialized?
        res = connection.bind_as(bind_options(cfg))
        logged_error_message!(connection, cfg.username) unless res
        res
      end
def bind_as ( connection , cfg ) raise :: Portus :: LDAP :: Error , "LDAP is disabled" unless cfg . enabled? raise :: Portus :: LDAP :: Error , "Some parameters are missing" unless cfg . initialized? res = connection . bind_as ( bind_options ( cfg ) ) logged_error_message! ( connection , cfg . username ) unless res res end
Bind to the LDAP server with the given configuration by using the given
connection.
Bind to the LDAP server with the given configuration by using the given connection .
connection
cfg