mirror of
https://github.com/danbee/micropub.git
synced 2025-03-04 08:59:13 +00:00
Grab access token from form params if it's not in a header
This commit is contained in:
parent
c5532e23d4
commit
fa0ee16991
@ -56,6 +56,7 @@ module Micropub
|
|||||||
token = Indieauth::Token.new(endpoints.token_endpoint)
|
token = Indieauth::Token.new(endpoints.token_endpoint)
|
||||||
|
|
||||||
auth_type, auth_token = request.env["HTTP_AUTHORIZATION"]&.split(" ")
|
auth_type, auth_token = request.env["HTTP_AUTHORIZATION"]&.split(" ")
|
||||||
|
auth_token ||= params["access_token"]
|
||||||
|
|
||||||
auth_type == "Bearer" && token.validate(auth_token)
|
auth_type == "Bearer" && token.validate(auth_token)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user