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

Add fields for basic auth #1133

Merged
merged 3 commits into from
Nov 2, 2021
Merged

Add fields for basic auth #1133

merged 3 commits into from
Nov 2, 2021

Conversation

ResamVi
Copy link
Contributor

@ResamVi ResamVi commented Oct 16, 2021

Solves #957

This adds a field auth to the feedreader module:
For private rss feeds returning a 401 it attempts basic auth
by cycling through the auth list
This was changed (see comment below)

E.g.:

feedreader:
  enabled: true
  feeds:
  - http://localhost:3000/feed/rss.xml
  auth:
  - ["user", "password"]
  - ["john doe", "supersecret"]
  feedLimit: 10
  position:
    top: 1
    left: 1
    width: 2
    height: 1
  refreshInterval: 14400

I've added a test but it's in the app folder because otherwise it would cause an import cycle.

This upgrades the gofeed dependency to a more recent commit (three days ago, that's some lucky timing) where basic authentication is implemented

@Seanstoppable
Copy link
Collaborator

I'm concerned about the strategy of cycling through the auth list, as you are effectively sending your credentials to a bunch of sites.
Per @senorprogrammer's comment on the issue, we probably want a more robust struct of data if we want to support this, so there is a 1:1 mapping of credentials to url.

@ResamVi
Copy link
Contributor Author

ResamVi commented Oct 17, 2021

OK, I see. 👍 I'll change it to a proper mapping

@ResamVi
Copy link
Contributor Author

ResamVi commented Oct 29, 2021

The new structure looks like this now. Of course it's still backwards compatible with the old list structure

feedreader:
  enabled: true
  feeds:
    http://localhost:3000/feed/rss.xml:
      username: john doe
      password: supersecret
    http://localhost:3001:
      username: anna
      password:
  feedLimit: 10
  position:
    top: 1
    left: 1
    width: 2
    height: 1
  refreshInterval: 14400

@senorprogrammer senorprogrammer merged commit 6070e64 into wtfutil:master Nov 2, 2021
@senorprogrammer
Copy link
Collaborator

Looks great 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants