IdeaBlade DevForce 2010 Help Reference
Login(ILoginCredential,LoginOptions) Method
See Also  Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel.Security Namespace > Authenticator Class > Login Method : Login(ILoginCredential,LoginOptions) Method



credential
options
Validate user credentials against an Entity Server.

Syntax

Visual Basic (Declaration) 
Public Overloads Function Login( _
   Optional ByVal credential As ILoginCredential, _
   Optional ByVal options As LoginOptions _
) As IAuthenticationContext
Visual Basic (Usage)Copy Code
Dim instance As Authenticator
Dim credential As ILoginCredential
Dim options As LoginOptions
Dim value As IAuthenticationContext
 
value = instance.Login(credential, options)

Parameters

credential
options

Return Value

An AuthenticationContext representing the user

Exceptions

ExceptionDescription
IdeaBlade.EntityModel.LoginExceptionLogin failure

Remarks

The LoginOptions can be used to specify the EntityServer. If options are not provided, the "default" EntityServer is assumed.

You can pass a null (Nothing in Visual Basic) in place of an IdeaBlade.EntityModel.ILoginCredential object. Null credentials can indicate either that the user is logging in as a guest or anonymous user, or when using the AspAuthenticatingLoginManager that the current authenticated user should be loaded. When using ASP.NET the current authenticated user is one authenticated via Windows authentication, or is the user already logged in because of either a persistent cookie or a login performed elsewhere in the ASP.NET application. If you are not using the AspAuthenticationLoginManager then your implementation of IEntityLoginManager should handle a null credential if your client application can provide one.

The AllowAnonymousLogin flag in the IdeaBlade configuration determines whether "anonymous" users can login to your application. Anonymous users are ones who have not supplied credentials and who also cannot be authenticated by other means, such as ASP.NET authentication.

The AuthenticationContext returned from a successful login can be used in two ways: 1) you can set the DefaultAuthenticationContext so that any EntityManager in your application will share the credentials and not require a separate login, or 2) you can set the IdeaBlade.EntityModel.EntityManager.AuthenticationContext on one or more EntityManager instances. Note that without performing one of these actions the returned AuthenticationContext will not be used by DevForce.

Credentials are passed in clear text. Use a secure channel (such as SSL) or provide your own encryption if secure communications are necessary.

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.