.NET Standard 2.0+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET 5.0+

AuthenticationActiveDirectory.Authenticate(IObjectSpace) Method

Returns an authenticated user.

Namespace: DevExpress.ExpressApp.Security

Assembly: DevExpress.ExpressApp.Security.v21.2.dll


public override object Authenticate(
    IObjectSpace objectSpace


Name Type Description
objectSpace IObjectSpace

An IObjectSpace object which is an object space used to find a user by logon parameters.


Type Description

An object which is the authenticated user.


The AuthenticationActiveDirectory authentication uses the WindowsIdentity.Name property of an object obtained via the static WindowsIdentity.GetCurrent method to get a user name in the DOMAIN\USERNAME format. This string is used to find a persisted object of the AuthenticationActiveDirectory.UserType with the matching ISecurityUser.UserName value (the IObjectSpace.FindObject method is used internally). If a matching user object is not found and the AuthenticationActiveDirectory.CreateUserAutomatically property is set to true, a new use object is created. Additionally, the AuthenticationActiveDirectory.CustomCreateUser event is raised. If this event is not handled or its Handled parameter is false, the new user of the AuthenticationActiveDirectory.UserType type is created via the IObjectSpace.CreateObject method. The created object should support the IAuthenticationActiveDirectoryUser interface. The IAuthenticationActiveDirectoryUser.UserName property is used to pass a user name. These changes are immediately committed via the IObjectSpace.CommitChanges.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Authenticate(IObjectSpace) method.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also