Visual Guard Class Library Documentation

VGAuthenticationStatus Enumeration

Defines all the authentication status

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

public enum VGAuthenticationStatus

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

Members

Member Name Description Value
Failure The authentication fails. 1
UserNotFound The authentication fails. The user is not found in the repository 2
PasswordIsLocked The authentication fails. The password is locked and must be unlocked by an administrator 4
PasswordDoesNotMatch The authentication fails. The password does not match the password stored in the repository. 8
UserNotAuthorized The authentication fails. The user does not have any granted role for the application. 16
UserAccountExpired The authentication fails. The user account is expired. 32
UserAccountNotYetAvailable The authentication fails. The user account is not yet available. 64
ProcessCanceled The authentication fails. The logon process has been canceled by the user. 128
NotApproved The authentication fails. The credential is not approved and cannot be authenticated. 256
MustChangePasswordAtNextLogon The authentication fails. The password must be changed during the logon process. You must call the method ChangePassword before attempting to authenticate the user. 512
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. 1024
Success The authentication succeeds. 2048
LastGraceLogon 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. 4096
PasswordExpired The authentication succeeds but the password is expired and must be changed. 8192
PasswordDoesNotPassValidation The authentication succeeds but the password does not pass the validation according to the password policy 16384
PasswordWillBeLocked The password will be locked for the next login attempt. The password must be changed before the next login attempt. 32768

Requirements

Namespace: Novalys.VisualGuard.Security

Assembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll)

See Also

Novalys.VisualGuard.Security Namespace