Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support bearer authentication #32

Open
fluffy-critter opened this issue Nov 5, 2019 · 2 comments
Open

Support bearer authentication #32

fluffy-critter opened this issue Nov 5, 2019 · 2 comments

Comments

@fluffy-critter
Copy link
Contributor

fluffy-critter commented Nov 5, 2019

Pushl should be able to support private webmentions by supporting AutoAuth or some other bearer token mechanism.

@fluffy-critter
Copy link
Contributor Author

For the actual implementation it probably makes the most sense to be able to provide a bearer token, and have a separate helper app that can fetch one. (Which is also nice for my use case because it's trivial for me to just generate a bearer token locally instead of having to go through my IndieAuth endpoint.)

@fluffy-critter
Copy link
Contributor Author

Some thoughts on this: maybe add a --bearer parameter which specifies a script to call. When pushl gets a WWW-Authenticate header in a response, it does token_endpoint discovery (via <link> tag and/or Link: header) and calls the script with e.g.

bearerScript attemptedUrl scope endpoint

where scope and/or endpoint could be empty strings. Then the script can return status 0 and a bearer token to use, or status non-zero and an error message to propagate to the user. If the script provides a token, Pushl retries the content retrieval with it. Pushl should also cache the token on a per-domain basis, and provide that in the initial request.

@fluffy-critter fluffy-critter changed the title Support AutoAuth Support bearer authentication Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant