WMTSStoreNewPage class has the possibility to enter credential fields such as username and password. I would expect when those fields are entered Basic Authentication header is added for all requests to WMTS server. This is not happening. Access to restricted site results in HTTP 401 error.
Note: Same functionality is build for WMS sources and it works there as expected.
See attached screenshot of the error when accessing restricted WMTS server.