@property<EOL><INDENT>def connection(self):<DEDENT>
ctx = stack.top<EOL>if ctx is None:<EOL><INDENT>raise Exception("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>if hasattr(ctx, '<STR_LIT>'):<EOL><INDENT>return ctx.ldap3_manager_main_connection<EOL><DEDENT>else:<EOL><INDENT>connection = self._make_connection(<EOL>bind_user=self.config.get('<STR_LIT>'),<EOL>bind_password=self.config.get('<STR_LIT>'),<EOL>contextualise=False<EOL>)<EOL>connection.bind()<EOL>if ctx is not None:<EOL><INDENT>ctx.ldap3_manager_main_connection = connection<EOL><DEDENT>return connection<EOL><DEDENT>
Convenience property for externally accessing an authenticated
connection to the server. This connection is automatically
handled by the appcontext, so you do not have to perform an unbind.

Returns:
    ldap3.Connection: A bound ldap3.Connection
Raises:
    ldap3.core.exceptions.LDAPException: Since this method is performing
        a bind on behalf of the caller. You should handle this case
        occuring, such as invalid service credentials.