New Posts New Posts RSS Feed: OOB Offline Login
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

OOB Offline Login

 Post Reply Post Reply
Author
steveprov View Drop Down
Newbie
Newbie


Joined: 11-Feb-2011
Posts: 3
Post Options Post Options   Quote steveprov Quote  Post ReplyReply Direct Link To This Post Topic: OOB Offline Login
    Posted: 16-Mar-2011 at 5:58pm
We have a SL4 app using AspNetMembership and EntityManager.LoginAsync and all works very well. We now want to provide our users the ability to work in offline mode which seems doable according to the documentatiion.
 
What I can't seem to get a handle on is how to wire into the LoginAsync to enable me to provide some Offline Authentication and Autorization when disconnected from the Membership tables on the server.
 
I have already serialized the SessionBundle returned from an online login and saved it to Isolated storage then deserialized it but don't know what to do with it :-)
 
Any help would be great
 
Steve Provencher
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 17-Mar-2011 at 5:08pm
Hi steveprov;

As you have noted, when offline, there is no host to authenticate the user, and you cannot call the Login or LoginAsync method. However, this is okay, since there is no access to the database or other non-local datasource in this circumstance. 

To authenticate the user, you can:

1. Check for the successful decryption of the cache which will indicate that they have entered the correct credentials, or

2. If you are not encrypting the cache, compare the hash of the credentials to the locally stored hash that was computed from a prior successful login.

Hope this helps.
Back to Top
steveprov View Drop Down
Newbie
Newbie


Joined: 11-Feb-2011
Posts: 3
Post Options Post Options   Quote steveprov Quote  Post ReplyReply Direct Link To This Post Posted: 18-Mar-2011 at 3:51am
Denis,
 
Thanks I have done #2 and am also encrypting the cache. I guess I was concered that Def Force would not work properly with a null SessionBundle. Turns oput that is not the case.
 
Thanks again
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down