DevForce Help Reference
Login(ILoginCredential,LoginOptions) Method


Validate user credentials against an Entity Server.
Syntax
'Declaration
 
Public Overloads Function Login( _
   Optional ByVal credential As ILoginCredential, _
   Optional ByVal options As LoginOptions _
) As IAuthenticationContext
'Usage
 
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 IdeaBlade.EntityModel.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 IdeaBlade.EntityModel.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 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

Authenticator Class
Authenticator Members
Overload List

Send Feedback