@Override
    public void setSameSite(SameSiteOptions sameSite) {
        this.sameSite = sameSite;
        if (this.sameSite == SameSiteOptions.NONE) {
            // do not allow invalid cookies. Only secure cookies are allowed if SameSite is set to NONE.
            setSecure(true);
        }
    }
{@code -1} indicating that no version property should be set on the cookie.
web/src/main/java/org/apache/shiro/web/servlet/SimpleCookie.java