Defines all the authentication status

Namespace:  Novalys.VisualGuard.Security
Assembly:  Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 3.2.912.1 (3.2.912.01)

Syntax

C#
[FlagsAttribute]
public enum VGAuthenticationStatus
Visual Basic (Declaration)
<FlagsAttribute> _
Public Enumeration VGAuthenticationStatus

Members

Member nameDescription
Failure
The authentication fails.
UserNotFound
The authentication fails. The user is not found in the repository
PasswordIsLocked
The authentication fails. The password is locked and must be unlocked by an administrator
PasswordDoesNotMatch
The authentication fails. The password does not match the password stored in the repository.
UserNotAuthorized
The authentication fails. The user does not have any granted role for the application.
UserAccountExpired
The authentication fails. The user account is expired.
UserAccountNotYetAvailable
The authentication fails. The user account is not yet available.
ProcessCanceled
The authentication fails. The logon process has been canceled by the user.
NotApproved
The authentication fails. The credential is not approved and cannot be authenticated.
MustChangePasswordAtNextLogon
The authentication fails. The password must be changed during the logon process. You must call the method ChangePassword(String, String, String, String) before attempting to authenticate the user.
LastBadLogin
The authentication fails. The password does not match the password stored in the repository and if the next login attempt fails the account will be locked.
Success
The authentication succeeds.
LastGraceLogon Obsolete.
LastGraceLogon has been deprecated. The authentication succeeds but the password is expired and it is the last grace logon. If the password is not changed before next login attempt, the password will be locked.
PasswordExpired
The authentication succeeds if it is not the last grace logon or fails otherwise. The password is expired and must be changed.
PasswordDoesNotPassValidation
The authentication succeeds if it is not the last grace logon or fails otherwise. The password does not pass the validation according to the password policy and must be changed
PasswordWillBeLocked
The authentication fails. The password will be locked for the next login attempt.

Remarks

Since Status can be a combination (bit-flag) of enum values, you can't use the equality operator to compare them. To test if an authentication has failed, you must use this syntax:
CopyC#
if ((status & VGAuthenticationStatus.Failure) == VGAuthenticationStatus.Failure)
{
    // Authentication has failed
    if ((status & VGAuthenticationStatus.PasswordDoesNotMatch) == VGAuthenticationStatus.PasswordDoesNotMatch)
    {
        // Invalid password
    }
}
CopyVB.NET
if (status And VGAuthenticationStatus.Failure) = VGAuthenticationStatus.Failure Then
    ' Authentication has failed
    if (status And VGAuthenticationStatus.PasswordDoesNotMatch) = VGAuthenticationStatus.PasswordDoesNotMatch Then
        // Invalid password ...
    End If
End If

See Also