Here is the client code in Javascript for a PhoneGap mobile app using all
the web2py mods and controller code I have previously posted.
Hopefully it is straight forward to convert to C++ or C# for a Windows
client app as well:
It uses the HTML 5 feature "window.localStorage" instead of cookies
Another patch:
In login_cookieless(), after:
session.person_email=rows[0].email
insert this following line:
session._try_store_in_db(request, response) # save changes to the
session
On Sunday, November 25, 2012 7:41:00 AM UTC-6, dlypka wrote:
>
> Sample controller code:
> (This is n
Sample controller code:
(This is not production quality code. It is meant only to suggest an
approach to use).
def isloggedin_cookieless0(self):
request,response,session,cache,T,db=self._globals()
retIsLoggedIn = False
person_id = session.person_id
retIsLoggedIn = True if person_id else Fals
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.w
Here is the first bit of my patch to enable web2py to handle a cookieless
login and session reconnect:
1. in main.py around line 401
static_file = False
try:
try:
try:
change to
static_file = False
isSessionRecordCreated = False # dlypka mod
try:
But from what I understand, the session logic in globals.py and main.py
pretty much depends on cookies in the client for
finding out what session to reconnect to on subsequent requests after the
very first request (which creates the session record).
But a windows client will not know what a cooki
Jim,
If your windows users are logging in via active directory you could just
make your web2py app authenticate through ldap to AD. That would ensure AD
is your source of truth fo user authentication and management.
Just a thought.
On Thursday, November 15, 2012 12:32:03 PM UTC-5, Jim S wrote
I intend to create some sample code fragments.
I will try to post something by Monday.
On Thursday, November 15, 2012 9:16:09 PM UTC-6, Jim S wrote:
>
> I would be interested in learning more. do you have any samples you could
> share?
> On Nov 15, 2012 8:52 PM, "dlypka" > wrote:
>
>> I recently
I would be interested in learning more. do you have any samples you could
share?
On Nov 15, 2012 8:52 PM, "dlypka" wrote:
> I recently devised some changes to globals.py and main.py to allow a
> non-cookies client to log into web2py and keep the same
> session record between requests, just as a b
I recently devised some changes to globals.py and main.py to allow a
non-cookies client to log into web2py and keep the same
session record between requests, just as a browser does. In my case the
client is a PhoneGap app and I hit web2py through
HTTP. I store the web2py session record id on the
My main concern is that with this being a desktop app that I don't want to
have to keep the latest versions of those files on the client machines.
I switched my desktop authorization to read the Windows username and then
match it to a username in the auth_user table and rely on the Windows
auth
ehm validators.py (if not all, just crypt and lazycrypt, plus Validator
original class), utils.py and pbkdf2 is all you need.
On Thursday, November 15, 2012 6:32:03 PM UTC+1, Jim S wrote:
>
> Sounds like there is no easy way to do it. I looked through that code and
> it seems pretty involve
Sounds like there is no easy way to do it. I looked through that code and
it seems pretty involved. I was hoping to do this without needing the
web2py libs and such.
-Jim
On Thursday, November 15, 2012 11:14:09 AM UTC-6, Niphlod wrote:
>
> https://github.com/web2py/web2py/blob/master/gluon/to
https://github.com/web2py/web2py/blob/master/gluon/tools.py#L1776
that basically calls the validators attached by default to a password field
https://github.com/web2py/web2py/blob/master/gluon/tools.py#L1479
i.e. you just have to import the validator CRYPT and check with that
passing the correct
14 matches
Mail list logo