Python Forum
Problem enabling http auth in a route
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem enabling http auth in a route
#1
Hello, can someone help me with this please?

This route works as expected

@app.route( '/download', method=['GET', 'POST'] )
def download( pymydb ):
while the following, in which iam trying with http auth

@app.route( '/download', method=['GET', 'POST'] )
@auth_basic(counters.is_authenticated_user)
def download( pymydb ):
fails by giving me the error

Error:
TypeError("download() missing 1 required positional argument: 'pymydb'",) Traceback: Traceback (most recent call last): File "/usr/lib64/python3.6/site-packages/bottle.py", line 862, in _handle return route.call(**args) File "/usr/lib64/python3.6/site-packages/bottle.py", line 1740, in wrapper rv = callback(*a, **ka) File "/usr/lib64/python3.6/site-packages/bottle.py", line 2690, in wrapper return func(*a, **ka) TypeError: download() missing 1 required positional argument: 'pymydb'
Why is that? How will i be able to enable http auth in this route?
Reply


Messages In This Thread
Problem enabling http auth in a route - by nikos - Feb-28-2019, 01:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to POST html data to be handled by a route endpoint nikos 1 2,347 Mar-07-2020, 03:14 PM
Last Post: nikos
  Google calendar pthon flask auth Kireta 0 2,046 Sep-16-2019, 04:50 PM
Last Post: Kireta
  Problem with arguments in route function. darktitan 2 2,957 Aug-26-2019, 04:55 PM
Last Post: snippsat
  Flask tutorial errors in jinja, auth undefined Ecniv 2 2,452 May-03-2019, 02:04 PM
Last Post: Ecniv
  Passing a query value from a Bottle html template to a route with an encoding nikos 0 2,891 Sep-30-2018, 03:29 AM
Last Post: nikos
  Python /Flask Login with LDAP Auth pythonnubie 4 8,532 Apr-16-2018, 03:14 PM
Last Post: nilamo
  Uninitialized ASN.1 value in Flask LDAP3 Auth blueprint zoidberg 1 4,112 Nov-15-2017, 12:29 PM
Last Post: zoidberg

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020