Sha256: 550f5372df6a5dafefb9ca87fabec17b7ea3234bd9619f2453896ec186e8b88a

Contents?: true

Size: 585 Bytes

Versions: 13

Compression:

Stored size: 585 Bytes

Contents

module Net
  class LDAP
    class AuthAdapter
      def self.register(names, adapter)
        names = Array(names)
        @adapters ||= {}
        names.each do |name|
          @adapters[name] = adapter
        end
      end

      def self.[](name)
        a = @adapters[name]
        if a.nil?
          raise Net::LDAP::AuthMethodUnsupportedError, "Unsupported auth method (#{name})"
        end
        return a
      end

      def initialize(conn)
        @connection = conn
      end

      def bind
        raise "bind method must be overwritten"
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
net-ldap-0.19.0 lib/net/ldap/auth_adapter.rb
net-ldap-0.18.0 lib/net/ldap/auth_adapter.rb
net-ldap-0.17.1 lib/net/ldap/auth_adapter.rb
net-ldap-0.17.0 lib/net/ldap/auth_adapter.rb
net-ldap-0.16.3 lib/net/ldap/auth_adapter.rb
net-ldap-0.16.2 lib/net/ldap/auth_adapter.rb
net-ldap-0.16.1 lib/net/ldap/auth_adapter.rb
net-ldap-0.16.0 lib/net/ldap/auth_adapter.rb
net-ldap-0.15.0 lib/net/ldap/auth_adapter.rb
net-ldap-0.14.0 lib/net/ldap/auth_adapter.rb
net-ldap-0.13.0 lib/net/ldap/auth_adapter.rb
net-ldap-0.12.1 lib/net/ldap/auth_adapter.rb
net-ldap-0.12.0 lib/net/ldap/auth_adapter.rb