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

Allow for configurable auth #4

Open
DarthHater opened this issue Mar 14, 2019 · 0 comments
Open

Allow for configurable auth #4

DarthHater opened this issue Mar 14, 2019 · 0 comments

Comments

@DarthHater
Copy link
Member

DarthHater commented Mar 14, 2019

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

  • What are you trying to do?

You should be able to specify an API key to use for cargo-pants, so that someone can use their own key.

As well, you can send a basic auth header of email:password, instead of the token, so we'd want to handle that path too.

  • What feature or behavior is this required for?

This allows someone to essentially auth with OSSIndex.

  • How could we solve this issue? (Not knowing is okay!)

Probably pick up an API Key from an environment variable, or something similar. For the email:password combo, build basic auth capabilities and probably pick this up from a file, maybe:

~/.cargo-pants/creds.something

  • Anything else?

Should also allow for reading credentials from environment variables.
For consistency, should follow the same naming as nancy, eg:

export [email protected]
export OSSI_TOKEN=A4@k3@p1T0k3n

and for IQ:

export [email protected]
export OSSI_TOKEN=A4@k3@p1T0k3n
export IQ_USERNAME=nondefaultuser
export IQ_TOKEN=yourtoken
export IQ_SERVER=http://adifferentserverurl:port
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