Defines all the authentication status

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

Syntax

C#
[FlagsAttribute]
public enum VGAuthenticationStatus
Visual Basic
<FlagsAttribute> 
Public Enumeration VGAuthenticationStatus

Members

Member nameValueDescription
Failure1 The authentication fails.
UserNotFound2 The authentication fails. The user is not found in the repository
PasswordIsLocked4 The authentication fails. The password is locked and must be unlocked by an administrator
PasswordDoesNotMatch8 The authentication fails. The password does not match the password stored in the repository.
UserNotAuthorized16 The authentication fails. The user does not have any granted role for the application.
UserAccountExpired32 The authentication fails. The user account is expired.
UserAccountNotYetAvailable64 The authentication fails. The user account is not yet available.
ProcessCanceled128 The authentication fails. The logon process has been canceled by the user.
NotApproved256 The authentication fails. The credential is not approved and cannot be authenticated.
MustChangePasswordAtNextLogon512 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.
LastBadLogin1024 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.
Success2048 The authentication succeeds.
LastGraceLogon4096 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.
PasswordExpired8192 The authentication succeeds if it is not the last grace logon or fails otherwise. The password is expired and must be changed.
PasswordDoesNotPassValidation16384 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
PasswordWillBeLocked32768 The authentication fails. The password will be locked for the next login attempt.
UserNotFoundInCustomStorage65536 The authentication fails. User does not exist in Custom identity module storage

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:
C# Copy imageCopy
if ((status & VGAuthenticationStatus.Failure) == VGAuthenticationStatus.Failure)
{
    // Authentication has failed
    if ((status & VGAuthenticationStatus.PasswordDoesNotMatch) == VGAuthenticationStatus.PasswordDoesNotMatch)
    {
        // Invalid password
    }
}
Visual Basic Copy imageCopy
o
            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