Print Page | Close Window

Login behaviour in Model Explorer Sample Application

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1207
Printed Date: 31-Mar-2025 at 1:04am


Topic: Login behaviour in Model Explorer Sample Application
Posted By: antalakas
Subject: Login behaviour in Model Explorer Sample Application
Date 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



Replies:
Posted By: kimj
Date 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"
              >



Print Page | Close Window