Converts the username of a user to a Visual Guard unique repository id for the specified authentication mode

Namespace:  Novalys.VisualGuard.Security.Membership
Assembly:  Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 3.2.912.1 (3.2.912.01)

Syntax

C#
public static string ConvertUsernameToRepositoryId(
	string username,
	VGAuthenticationMode mode
)
Visual Basic (Declaration)
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

A 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

ExceptionCondition
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.

See Also