Here is a revision to Step 2:
2. In main.py starting around line 526
# ##################################################
# try load session or create new session file
# ##################################################
if not env.web2py_disable_session:
session.connect(request, response)
change to
# ##################################################
# try load session or create new session file
# ##################################################
session.connect(request, response, db) # dlypka mod -
added ,db
newsessionid = 0 # dlypka mod
if 'sessioncookieval_fromweb2py' in request.post_vars or
'checkIsLoggedIn' in request.post_vars : # dlypka mod
newsessionid = session._try_store_in_db(request,
response) # dlypka mod
if newsessionid > 0: # dlypka mod
isSessionRecordCreated = True; # dlypka mod
On Thursday, November 15, 2012 11:03:27 AM UTC-6, Jim S wrote:
>
> Hi, I'm creating a little desktop app as a companion to a web app I
> created with web2py. I'm using the default auth_user tables so I have an
> email address and encrypted password I can use for my desktop user to
> login. I've been looking for the code that does the login in web2py but
> can't seem to find it. Is there a recipe somewhere that would show me how
> to mimic the encryption that web2py uses so I compare encrypted passwords
> and use them to allow my desktop app users to login?
>
> -Jim
>
--