Since we want to connect our Instance with an OIDC Provider and we got client not authenticated errors, we checked the app, if it supports HTTP basic auth header. Luckily it does, but there is an issue in the check for using HTTP basic auth header.
In your check, you assume the token_endpoint_auth_methods_supported is always present. According to the OIDC discovery specs, this is an optional attribute. According to the comment in code, I would assume that basic authentication is also used, if there is no token_endpoint_auth_methods_supported provided by the OP discovery.