[MSC2140](https://github.com/matrix-org/matrix-doc/pull/2140) defines a new v2 API for Identity Servers and uses OpenID authentication as defined in [MSC1961](https://github.com/matrix-org/matrix-doc/pull/1961). We need to add support for the new API version and authentication requirement in all places that IS APIs are used.