Skip to content

Feature request: support IndieAuth introspection endpoint #121

@martymcguire

Description

@martymcguire

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-urlencoded POST 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions