-
-
Notifications
You must be signed in to change notification settings - Fork 5
Description
When verifying an auth token, Aperture uses the old indieauth.com-style of making a GET request to the user's token_endpoint with an Authorization: Bearer <TOKEN> header: https://github.com/aaronpk/Aperture/blob/main/aperture/app/Http/Middleware/VerifyIndieAuthAccessToken.php#L83-L113
Per recent(ish?) updates to IndieAuth, I believe it should instead support calling the Introspection endpoint: https://indieauth.spec.indieweb.org/#access-token-verification-request
To my understanding the changes there are:
- an
application/x-www-form-urlencodedPOST request to the introspection endpoint (discovered from the new indieauth-metadata endpoint, etc.) - relying apps like Aperture need their own authorization method to talk to the introspection endpoint. This seems a little open ended and I've just been using a shared secret in the
Authorization: Bearer <SECRET>HTTP header in my setups. 🤷♂️ - the token to check now goes in the body as
token=<TOKEN>
In my minimal setups (micropub and micropub-media endpoints) I've used the presence of a "token endpoint secret" in the configuration as a sign to use the introspection endpoint method. If there's no secret set, it falls back on the old authorization-header-to-the-token-endpoint.