Right now this service expects from us Authorization: Basic, which is not so bad from CURL perspective - just -u "username:token", but that still requires from us to know a GH user behind provided token.
The GithubAuthenticationManager can be adjusted to just rely on that provided GH token and then probably call respective GH API: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-user.
This would let our project-api clients to avoid extra gh api /user --jq '.login' call or hard code username into our clients or require it alongside with the token.
Right now this service expects from us
Authorization: Basic, which is not so bad fromCURLperspective - just-u "username:token", but that still requires from us to know a GH user behind provided token.The
GithubAuthenticationManagercan be adjusted to just rely on that provided GH token and then probably call respective GH API: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-user.This would let our
project-apiclients to avoid extragh api /user --jq '.login'call or hard codeusernameinto our clients or require it alongside with thetoken.