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

Not supporting https://user:pass@server #27

Open
dctim opened this issue Jul 28, 2020 · 1 comment
Open

Not supporting https://user:pass@server #27

dctim opened this issue Jul 28, 2020 · 1 comment

Comments

@dctim
Copy link

dctim commented Jul 28, 2020

I'm trying to figure out if flask-basicauth doesn't support this, or if I'm doing something wrong.

With other http / apache Basic Auth you can get straight to the site through embedding the user/pass into the URL like:
http://user:pass@server
Is this possible? I haven't made it work yet. Below is my code.
`
from flask_basicauth import BasicAuth
app = flask.Flask(name)
CORS(app)
#CORS(app, expose_headers='Authorization'). #Did not work

app.config['BASIC_AUTH_USERNAME'] = 'user'
app.config['BASIC_AUTH_PASSWORD'] = 'pass'
app.config['BASIC_AUTH_FORCE'] = True
basic_auth = BasicAuth(app)

@app.route('/', methods=['GET'])
def hello():
return '''Running'''
`

@mdavis-xyz
Copy link

That should be possible. My understanding is that the client should extract the password and put it in a header for you. So this library can't tell the difference.

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

2 participants