Defines all the authentication status
Namespace: Novalys.VisualGuard.SecurityAssembly: 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 name | Value | Description | |
---|---|---|---|
Failure | 1 | The authentication fails. | |
UserNotFound | 2 | The authentication fails. The user is not found in the repository | |
PasswordIsLocked | 4 | The authentication fails. The password is locked and must be unlocked by an administrator | |
PasswordDoesNotMatch | 8 | The authentication fails. The password does not match the password stored in the repository. | |
UserNotAuthorized | 16 | The authentication fails. The user does not have any granted role for the application. | |
UserAccountExpired | 32 | The authentication fails. The user account is expired. | |
UserAccountNotYetAvailable | 64 | The authentication fails. The user account is not yet available. | |
ProcessCanceled | 128 | The authentication fails. The logon process has been canceled by the user. | |
NotApproved | 256 | The authentication fails. The credential is not approved and cannot be authenticated. | |
MustChangePasswordAtNextLogon | 512 | 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 | 1024 | 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 | 2048 | The authentication succeeds. | |
LastGraceLogon | 4096 | 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 | 8192 | The authentication succeeds if it is not the last grace logon or fails otherwise. The password is expired and must be changed. | |
PasswordDoesNotPassValidation | 16384 | 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 | 32768 | The authentication fails. The password will be locked for the next login attempt. | |
UserNotFoundInCustomStorage | 65536 | 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 |
---|---|
if ((status & VGAuthenticationStatus.Failure) == VGAuthenticationStatus.Failure) { // Authentication has failed if ((status & VGAuthenticationStatus.PasswordDoesNotMatch) == VGAuthenticationStatus.PasswordDoesNotMatch) { // Invalid password } } |
Visual Basic | Copy |
---|---|
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 |