Skip to main content
.NET 6.0+

AuthenticationActiveDirectory.Authenticate(IObjectSpace) Method

Returns an authenticated user.

Namespace: DevExpress.ExpressApp.Security

Assembly: DevExpress.ExpressApp.Security.v24.1.dll

Declaration

public override object Authenticate(
    IObjectSpace objectSpace
)

Parameters

Name Type Description
objectSpace IObjectSpace

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

Returns

Type Description
Object

An object which is the authenticated user.

Remarks

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.

See Also