I have added the following to a controller method:
@auth.requires_login()
def index():
return 'Hello world!'
This forces the app to take the user to the login page correctly.
I have then added a simple class:
def querystring_auth():
"""
Querystring based auth
"""
def querystring_login_aux():
return True
return token_login_aux()
In db.py I have added this:
import token_auth
auth.settings.login_methods[0] = [token_auth]
The end result is I am still taken to the login page. My question is: how can I get it to base the login on the result of my custom Auth class and in turn how do I make it so the user is simple represented by a UUID stored in auth_users along with a simple description. I don't care about requiring or showing any other fields.