Add authorization check.
This commit is contained in:
parent
e921dbeb5f
commit
554a531f57
@ -64,6 +64,9 @@ class LoginResource(Resource):
|
|||||||
def post(self):
|
def post(self):
|
||||||
"""Login to retrieve authentication token."""
|
"""Login to retrieve authentication token."""
|
||||||
|
|
||||||
|
if not request.authorization:
|
||||||
|
ns.abort(401, "Missing authorization.")
|
||||||
|
|
||||||
email = request.authorization['username']
|
email = request.authorization['username']
|
||||||
password = request.authorization['password']
|
password = request.authorization['password']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user