1
0
mirror of https://github.com/danbee/micropub.git synced 2025-03-04 08:59:13 +00:00

The IndieWeb API has changed

This commit is contained in:
Daniel Barber 2022-08-16 22:22:59 -05:00
parent 2dac20c0b4
commit ac14f01af2
2 changed files with 11 additions and 3 deletions

View File

@ -1,7 +1,11 @@
module Indieauth
class Endpoints
def initialize(site_url)
@endpoints = IndieWeb::Endpoints.get(site_url)
@site_url = site_url
end
def endpoints
client.endpoints
end
def method_missing(method)
@ -10,6 +14,10 @@ module Indieauth
private
attr_accessor :endpoints
def client
IndieWeb::Endpoints::Client.new(site_url)
end
attr_accessor :site_url
end
end

View File

@ -55,7 +55,7 @@ module Micropub
end
def valid_token?
token = Indieauth::Token.new(endpoints.token_endpoint)
token = Indieauth::Token.new(endpoints[:token_endpoint])
_, auth_token = request.env["HTTP_AUTHORIZATION"]&.split(" ")
auth_token ||= params["access_token"]