New Posts New Posts RSS Feed: Login behaviour in Model Explorer Sample Application
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Login behaviour in Model Explorer Sample Application

 Post Reply Post Reply
Author
antalakas View Drop Down
Newbie
Newbie
Avatar

Joined: 25-Jun-2007
Location: Greece
Posts: 28
Post Options Post Options   Quote antalakas Quote  Post ReplyReply Direct Link To This Post Topic: Login behaviour in Model Explorer Sample Application
    Posted: 10-Apr-2009 at 2:33pm
Hello,
 
After little digging in this example, i found that when the Login (sync) function is called, the login credentials are null. This doesn 't stop the callback (logged in?) to hit with success (logged in!) and the Principal member filled in correctly.
 
Could you please clarify what is going on?
 
On second view i found a region principal_id in the .ibedmx designer. Is this relevant?
 
Thank you
 
Andreas
Andreas Ntalakas
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 13-Apr-2009 at 12:30pm
The ModelExplorerViewModel is doing a synchronous call to the PersistenceService Login, but that method, in BasicPersistenceService, is actually performing an asynchronous login using EnitityManager.LogicAsync.  This works with null credentials because in this sample there's no IEntityLoginManager implementation to validate credentials.  DevForce itself accepts null credentials and creates a dummy GenericPrincipal to uniquely identify the user. 
 
To have DevForce enforce user authentication you should implement the IEntityLoginManager interface, and also set the "loginManagerRequied" flag in the ideaBlade.v4 element:
 
  <ideaBlade.v4 version="4.00" 
              clientApplicationType="Silverlight"
              loginManagerRequired="true"
              >
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down