implement bearer token authentication #15
Loading…
Reference in a new issue
No description provided.
Delete branch "bearer-authentication"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bearer token authentication is implemented on the back end. This should eventually help with problems brought up in #14 (but the client also needs to be adjusted).
Since we already basically used bearer tokens this is not really tricky, it just has to be put into/taken from the right fields & formats for OAuth 2.0.
Does this break compatibility with the Misskey API?
As far as I understand it, this is just a different keyword in the JSON to mark the token, so I can just pass it in two different flavours to be compatible with Misskey and Foundkey?
This is not a breaking change. (yet?)
You are not quite right, the alternative way to pass in the token is via the HTTP Header
Authorization
in the formatBearer <token>
(where<token>
is what you put ini
). This is a standardized mechanism from OAuth 2.0 called Bearer Token Authentication.Note that passing in the token both ways is forbidden by the OAuth specification and will cause an error.
Also made a pull request to add this to Misskey: https://github.com/misskey-dev/misskey/pull/9021
LGTM - has this been tested? If so the merge button should be pressed imo ^^
Is running on my instance and didn't notice issues.