The solution
Added an optional parameter to getNotConsumedEntity() by adding a new signature, a boolean telling « skipAuth ». This assumes that the user is indeed pre-authenticated, there is a session running. But it’s probably the case, as it’s the first thing we do when testing the connection.