Defines all the authorization status
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
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#]
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]
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
Member Name | Description | Value |
---|---|---|
Failure | The authorization fails. | 1 |
UserNotFound | The authorization fails. The user is not found in the repository | 2 |
UserNotAuthorized | The authorization fails. The user does not have any granted role for the application. | 4 |
ProcessCanceled | The authorization fails. The authorization process has been canceled by the user. | 8 |
Success | The authorization succeeds. | 16 |
VersionNotCompatible | The version of the permissions is not compatible with the application. | 32 |
Namespace: Novalys.VisualGuard.Security
Assembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll)
Novalys.VisualGuard.Security Namespace