Api support required for checking the authorization for Github OAuth token after previous api has been deprecated
Describe the bug Github has deprecated previous REST api that was used to check the authorization of OAuth token as per https://docs.github.com/en/[email protected]/rest/reference/oauth-authorizations#check-an-authorization and blog post https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/
In this repository we are using the deprecated api :- https://github.com/hub4j/github-api/blob/main/src/main/java/org/kohsuke/github/GitHub.java#L1106 and there is no support for the new APIs mentioned as per blog. So we would need support for new APIs to be added in order to check for a token authorization part as well as for the other areas which has been effected by the deprecation of the authorization APIs.
To Reproduce Steps to reproduce the behavior:
- Create an OAuth token
- Try to validate the token using checkAuth Method https://github.com/hub4j/github-api/blob/main/src/main/java/org/kohsuke/github/GitHub.java#L1105 with valid clientId and accessToken created previously.
- It returns 404
Expected behavior checkAuth method or any other method added should not return 404 for a valid token and should return the proper GHAuthorization object.