DevForce Help Reference
Login Method (IEntityLoginManager)


Credentials to validate
A server-side EntityManager
Validate user credentials and return an IPrinicipal.
Syntax
'Declaration
 
Function Login( _
   ByVal credential As ILoginCredential, _
   ByVal entityManager As EntityManager _
) As IPrincipal
'Usage
 
Dim instance As IEntityLoginManager
Dim credential As ILoginCredential
Dim entityManager As EntityManager
Dim value As IPrincipal
 
value = instance.Login(credential, entityManager)

Parameters

credential
Credentials to validate
entityManager
A server-side EntityManager
Remarks

The System.Security.Principal.IPrincipal returned here is wrapped into a SessionBundle before returning to the client-side code which called Authenticator.Login. The EntityManager uses the SessionBundle in all further communications with the Entity Server. The IPrincipal returned is also used to set the System.Threading.Thread.CurrentPrincipal on the client and on the Entity Server during query and save processing.

System.Security.Principal.GenericPrincipal and System.Security.Principal.WindowsPrincipal are two standard implementations of the IPrincipal interface, but you may also use custom implementations. The UserBase type is also provided for Silverlight and ASP.NET applications.

The entityManager passed to this method is a special server-side EntityManager which is "connected" to the EntityServer and which does not require login credentials. You can use this EntityManager to query your domain model; if necessary, you can create a domain-specific EntityManager from this EntityManager using the IdeaBlade.EntityModel.EntityManager.#ctor(IdeaBlade.EntityModel.EntityManager) constructor overload of your domain manager.

Implementors should throw a LoginException if the credentials passed fail validation.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

IEntityLoginManager Interface
IEntityLoginManager Members

Send Feedback