def METHOD_NAME(conf, integration_db: MySqlIntegrationDb):
    """
    This function must be always implemented. KonText uses it to create an instance of your
    authentication object. The settings module is passed as a parameter.
    """
    plugin_conf = conf.get('plugins', plugins.runtime.AUTH.name)
    anonymous_user_id = int(plugin_conf['anonymous_user_id'])
    cookie_name = plugin_conf.get('api_key_cookie_name', None)
    http_header = plugin_conf.get('api_key_http_header', None)
    if cookie_name is None and http_header is None:
        raise KeyError(
            'Missing settings. Please define `api_key_cookie_name` or `api_key_http_header`.')
    return TokenAuth(integration_db, anonymous_user_id, cookie_name, http_header)