Creating custom auth

24 views
Skip to first unread message

Franky Davis Monroe Jr.

unread,
Mar 4, 2015, 2:59:27 PM3/4/15
to web...@googlegroups.com
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.

Massimo Di Pierro

unread,
Mar 4, 2015, 3:05:20 PM3/4/15
to web...@googlegroups.com
what is token_auth?

Massimo Di Pierro

unread,
Mar 4, 2015, 3:05:20 PM3/4/15
to web...@googlegroups.com
what is token_auth?

On Wednesday, 4 March 2015 13:59:27 UTC-6, Franky Davis Monroe Jr. wrote:
Reply all
Reply to author
Forward
0 new messages