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

Auth middleware #23

Closed
wants to merge 9 commits into from
Closed

Auth middleware #23

wants to merge 9 commits into from

Conversation

efixler
Copy link
Owner

@efixler efixler commented May 16, 2024

This PR enables the first iteration of JWT-based authorization to scrape endpoints, via a new middleware.

I'll skip most the usual PR info here in favor of linking to the documentation updates that step through the process of using authorization and details about how authorization is granted.

Steps to Test

To test this PR, first follow the steps in the docs, and then issue a request like this:

POST http://localhost:8080/extract
Content-Type: application/json
Authorization: Bearer PUT_YOUR_TOKEN_HERE

{
    "url": "https://road.cc/content/tech-news/zipps-new-tyres-ensure-safe-retention-hookless-rims-308387",
    "pp": true
}

Also, try it without a token or with a bad token once you've enabled auth.

@efixler efixler closed this May 16, 2024
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

Successfully merging this pull request may close these issues.

1 participant