def token_alert()

in src/pydolphinscheduler/configuration.py [0:0]


def token_alert(auth_token: str) -> None:
    """Alert when auth token is default token or None or not.

    To avoid user forget to change the default token, we will alert user we they use it.
    """
    if auth_token is None:
        logger.warning(
            "Auth token is None, highly recommend add a token in production, "
            "especially you deploy in public network."
        )
    config = get_configs()
    if config.get("java_gateway.auth_token") == auth_token:
        logger.warning(
            "Auth token is default token, highly recommend add a token in production, "
            "especially you deploy in public network."
        )