IdeaBlade DevForce 2010 Help Reference
Login Method
See Also  Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > IEntityLoginManager Interface : Login Method



credential
Credentials to validate
entityManager
A server-side EntityManager
Validate user credentials and return an IPrinicipal.

Syntax

Visual Basic (Declaration) 
Function Login( _
   ByVal credential As ILoginCredential, _
   ByVal entityManager As EntityManager _
) As IPrincipal
Visual Basic (Usage)Copy Code
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 EntityManager.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 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.