I would like for my users to connect to my Flask app using a syntax such as:
http://username:password@myapp.com/
as defined by RFC 3986 (chapter 3.2).
Is there a way I can access the username:password
part from Flask?
On my local server, if I access http://username@localhost:5000/
from Chrome for instance, I don't see anything in Flask's request
object, and the username@
part disappears from the address bar immediately.
xoxo
EDIT on May 1st:
This question has been marked as a duplicate of Flask HTTP Basicauth - How does it work?
However, my question is not related to the basic auth protocol. request.authorization
is None
in my case.
Second EDIT:
OK, my bad, it turns out the username:password@host
does implement the basic auth protocol but this syntax has been deprecated and is not implemented anymore by some browsers, including Chrome (see the bottom of this page)