Click or drag to resize

VGSecurityRuntimeValidateUser Method (String, String, VGAuthenticationMode)

Verifies that the supplied user name and password are valid.

Namespace:  Novalys.VisualGuard.Security
Assembly:  Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2019.1.831.19 (2019.1.0831.19)
Syntax
public VGAuthenticationState ValidateUser(
	string username,
	string password,
	VGAuthenticationMode mode
)

Parameters

username
Type: SystemString
The name of the user to be validated.
password
Type: SystemString
The password for the specified user.
mode
Type: Novalys.VisualGuard.SecurityVGAuthenticationMode
A VGAuthenticationMode value indicating the authentication mode used to validate the user.

Return Value

Type: VGAuthenticationState
a VGAuthenticationState indicating if the validation succeeds or not.
Exceptions
ExceptionCondition
ArgumentNullExceptionusername or password is null.
ArgumentExceptionusername is empty or contains invalid chars ('\', '/', '?', '*', '%', ';', ''', '"', ':', '|', '[', ']', '+', '=', ',').

or

username or password is longer than 64 characters.
VGConfigurationExceptionThe configuration file is not valid

or

A problem occurs during the connection to the repository.

or

The version of the repository or the version of the permissions is not supported by the application.
Remarks
This method do not changes the Principal property or the AuthenticationState property. You must use the method Authenticate(String, String, VGAuthenticationMode) to authenticate the current user.
See Also