From fa0ee1699129a41e4e1789450b81881a91407981 Mon Sep 17 00:00:00 2001 From: Daniel Barber Date: Sat, 16 Nov 2019 22:30:06 -0500 Subject: [PATCH] Grab access token from form params if it's not in a header --- lib/micropub/webserver.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/micropub/webserver.rb b/lib/micropub/webserver.rb index 9c76416..91b32f7 100644 --- a/lib/micropub/webserver.rb +++ b/lib/micropub/webserver.rb @@ -56,6 +56,7 @@ module Micropub token = Indieauth::Token.new(endpoints.token_endpoint) auth_type, auth_token = request.env["HTTP_AUTHORIZATION"]&.split(" ") + auth_token ||= params["access_token"] auth_type == "Bearer" && token.validate(auth_token) end