Manage multiple authentication methods.
This class supports dynamically adding and using different authentication methods. The Connection class is used to manage the authentication methods and to authenticate a user.
Example
>>> connection = Connection()
>>> # Enable a method without id
>>> connection.enable_method("ldap", True, "test.dom")
>>> # Enable a method with id
>>> connection.enable_method("ldap", True, "cert", id="example_id_ldap")
>>> # Authenticate a user using the enabled methods
>>> connection.connect("ldap", "test", "test")
>>> # Disable a method
>>> connection.enable_method("ldap", True, "cert", id="example_id_ldap")
>>> # Get the list of enabled methods
>>> connection.get_methods_ids()
> ['ldap_id', 'certificate_id']
>>> # Get the authentication method by its name
>>> connection.get_authentication_method_by_name("ldap")