Back to Devexpress

IAuthenticationStandardUser.ComparePassword(String) Method

expressappframework-devexpress-dot-persistent-dot-base-dot-security-dot-iauthenticationstandarduser-dot-comparepassword-x28-system-dot-string-x29.md

latest2.7 KB
Original Source

IAuthenticationStandardUser.ComparePassword(String) Method

Compares the current user’s stored encrypted password with its plain-text representation.

Namespace : DevExpress.Persistent.Base.Security

Assembly : DevExpress.Persistent.Base.v25.2.dll

NuGet Package : DevExpress.Persistent.Base

Declaration

csharp
bool ComparePassword(
    string password
)
vb
Function ComparePassword(
    password As String
) As Boolean

Parameters

NameTypeDescription
passwordString

A string which is the plain-text password for comparison.

|

Returns

TypeDescription
Boolean

true if the passwords are identical, otherwise - false

|

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

Note

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.

xaf-custom-logon-parameters/CS/XPO/WinForms/CustomLogonXPOWin/CustomLogonXPOWin.Module/Security/CustomAuthentication.cs#L27

csharp
if(!((IAuthenticationStandardUser)applicationUser).ComparePassword(customLogonParameters.Password))
    throw new AuthenticationException(

See Also

Passwords in the Security System

IAuthenticationStandardUser Interface

IAuthenticationStandardUser Members

DevExpress.Persistent.Base.Security Namespace