You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello (: I'm using this library and have added a couple of unsupported endpoints locally, that I am hoping to make a PR for soon. However, some of them require the request passes a JWT instead of an OAuth token.
Note: In most cases, you can use Authorization: Bearer or Authorization: token to pass a token. However, if you are passing a JSON web token (JWT), you must use Authorization: Bearer.
So it looks like allowing users to pass JWTs could be as simple as changing that token to Bearer (which would also be backwards compatible and so not require a major library version bump). However, it might be more explicit and user friendly to add a new JWT option to the GitHub.Auth sum type.
Hope this is all clear! Happy to open any needed PRs
The text was updated successfully, but these errors were encountered:
FWIW, at a glance it looks like you define a wrapper type for a JWT and define your own instance of AuthMethod. A mild inconvenience. I agree this library should adopt a JWT case of AuthMethod, as in #497. But I don't think the current lack of support is a hard blocker.
Hello (: I'm using this library and have added a couple of unsupported endpoints locally, that I am hoping to make a PR for soon. However, some of them require the request passes a JWT instead of an OAuth token.
This library, when you use OAuth authorisation, sets the Authorisation header as
Authorisation: token {token}
.However there is a note in the GitHub API docs that states:
So it looks like allowing users to pass JWTs could be as simple as changing that
token
toBearer
(which would also be backwards compatible and so not require a major library version bump). However, it might be more explicit and user friendly to add a new JWT option to the GitHub.Auth sum type.Hope this is all clear! Happy to open any needed PRs
The text was updated successfully, but these errors were encountered: