Currently the wan:infos command does not authenticate. However, this request provides more data when authenticated (e.g. the public IPv4).
Running this command without authentication may still be useful, so the best solution would be to run it authenticated if possible (if credentials or option flag provided), or else unauthenticated.