flask_ldap3_login/__init__.py
def add_server(self, hostname, port, use_ssl, tls_ctx=None):
        """
        Add an additional server to the server pool and return the
        freshly created server.

        Args:
            hostname (str): Hostname of the server
            port (int): Port of the server
            use_ssl (bool): True if SSL is to be used when connecting.
            tls_ctx (ldap3.Tls): An optional TLS context object to use
                when connecting.

        Returns:
            ldap3.Server: The freshly created server object.
        """
        if not use_ssl and tls_ctx:
            raise ValueError("Cannot specify a TLS context and not use SSL!")
        server = ldap3.Server(
            hostname,
            port=port,
            use_ssl=use_ssl,
            tls=tls_ctx
        )
        self._server_pool.add(server)
        return server
def add_server(self, hostname, port, use_ssl, tls_ctx=None):
        """
        Add an additional server to the server pool and return the
        freshly created server.

        Args:
            hostname (str): Hostname of the server
            port (int): Port of the server
            use_ssl (bool): True if SSL is to be used when connecting.
            tls_ctx (ldap3.Tls): An optional TLS context object to use
                when connecting.

        Returns:
            ldap3.Server: The freshly created server object.
        """
        if not use_ssl and tls_ctx:
            raise ValueError("Cannot specify a TLS context and not use SSL!")
        server = ldap3.Server(
            hostname,
            port=port,
            use_ssl=use_ssl,
            tls=tls_ctx
        )
        self._server_pool.add(server)
        return server
Add an additional server to the server pool and return the
        freshly created server.

        Args:
            hostname (str): Hostname of the server
            port (int): Port of the server
            use_ssl (bool): True if SSL is to be used when connecting.
            tls_ctx (ldap3.Tls): An optional TLS context object to use
                when connecting.

        Returns:
            ldap3.Server: The freshly created server object.