public function authenticate( $user ) {

        // Allow access to the index by default
        if ( '/' === WC()->api->server->path ) {
            return new WP_User( 0 );