Defines all the authorization 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 VGAuthorizationStatus
Visual Basic
<FlagsAttribute> 
Public Enumeration VGAuthorizationStatus

Members

Member nameValueDescription
Failure1 The authorization fails.
UserNotFound2 The authorization fails. The user is not found in the repository
UserNotAuthorized4 The authorization fails. The user does not have any granted role for the application.
ProcessCanceled8 The authorization fails. The authorization process has been canceled by the user.
Success16 The authorization succeeds.
VersionNotCompatible32 The version of the permissions is not compatible with the application.

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 authorization has failed, you must use this syntax:
C# Copy imageCopy
if ((status & VGAuthorizationStatus.Failure) == VGAuthorizationStatus.Failure)
{
    // Authentication has failed
    if ((status & VGAuthorizationStatus.UserNotFound) == VGAuthorizationStatus.UserNotFound)
    {
        // The user is not found in the repository ...
    }
}
Visual Basic Copy imageCopy
if (status And VGAuthorizationStatus.Failure) = VGAuthorizationStatus.Failure Then
    ' Authentication has failed
    if (status And VGAuthorizationStatus.UserNotFound) = VGAuthorizationStatus.UserNotFound Then
        ' The user is not found in the repository ...
    End If
End If

See Also