Converts the username of a user to a Visual Guard unique repository id for the specified authentication mode
Namespace: Novalys.VisualGuard.Security.MembershipAssembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2016.0.105.16 (2016.0.105.16)
Syntax
C# |
---|
public static string ConvertUsernameToRepositoryId( string username, VGAuthenticationMode mode ) |
Visual Basic |
---|
Public Shared Function ConvertUsernameToRepositoryId ( username As String, mode As VGAuthenticationMode ) As String |
Parameters
- username
- Type: System..::..String
the username to convert
- mode
- Type: Novalys.VisualGuard.Security..::..VGAuthenticationMode
the Visual Guard authentication mode
Return Value
Type: StringA Visual Guard unique repository id
Remarks
The Visual Guard unique repository id is used by Visual Guard to identify uniquely a user account in a Visual Guard repository.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | username is null. |
System..::..ArgumentException | username is empty.
- or - mode is equal to VisualGuard and is longer than 64 characters or contains invalid chars ('\', '/', '?', '*', '%', ';', ''', '"', ':', '|', '[', ']', '+', '=', ',').- or - mode is equal to Windows and username cannot be converted to a valid SID.- or - mode is not equal to Windows or VisualGuard or Database or is a combination of several values. |