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

Update basic auth docs #911

Merged
merged 2 commits into from
Mar 5, 2020
Merged

Conversation

wojtekmach
Copy link
Contributor

No description provided.

@@ -14,7 +14,7 @@ defmodule Plug.BasicAuth do
import Plug.BasicAuth
plug :basic_auth, username: "hello", password: "secret"

Or if you would rather put those in an environment variable:
Or if you would rather put those in a config file:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was on a fence here, now this section seems redundant to the section above, but if we're gonna use env variables we should use a different approach as they should be read at runtime.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant to say app env. Good catch.

@@ -33,13 +33,15 @@ defmodule Plug.BasicAuth do
If you want to provide your own authentication logic on top of
Basic HTTP auth, you can use the low-level functions. For example:

import Plug.BasicAuth
plug :auth

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to say then they can define their own plug, giving a bit more of context to what we are doing

@josevalim josevalim merged commit 56d10ca into elixir-plug:master Mar 5, 2020
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@wojtekmach wojtekmach deleted the wm-basic-auth-docs branch March 5, 2020 13:49
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.

2 participants