DevForce Help Reference
LoginAsync(ILoginCredential,LoginOptions,CancellationToken) Method


Perform an asynchronous login operation to validate user credentials against an Entity Server.
Syntax
'Declaration
 
Public Overloads Function LoginAsync( _
   ByVal credential As ILoginCredential, _
   ByVal options As LoginOptions, _
   ByVal cancellationToken As CancellationToken _
) As Task(Of IAuthenticationContext)
'Usage
 
Dim instance As Authenticator
Dim credential As ILoginCredential
Dim options As LoginOptions
Dim cancellationToken As CancellationToken
Dim value As Task(Of IAuthenticationContext)
 
value = instance.LoginAsync(credential, options, cancellationToken)

Parameters

credential
options
cancellationToken
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