Visual Guard Class Library Documentation

VGSecurityRuntime.ValidateUser Method (String, String, VGAuthenticationMode)

Verifies that the supplied user name and password are valid.

public VGAuthenticationState ValidateUser(
   String username,
   String password,
   VGAuthenticationMode mode
);

Parameters

username
The name of the user to be validated.
password
The password for the specified user.
mode
A VGAuthenticationMode value indicating the authentication mode used to validate the user.

Return Value

a VGAuthenticationState indicating if the validation succeeds or not.

Remarks

This method do not changes the Principal property or the AuthenticationState property. You must use the method Authenticate to authenticate the current user.

Exceptions

Exception Type Condition
ArgumentNullException username or password is null.
ArgumentException username is empty or contains invalid chars ('\', '/', '?', '*', '%', ';', ''', '"', ':', '|', '[', ']', '+', '=', ',').

or

username or password is longer than 64 characters.
VGConfigurationException The 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.

See Also

VGSecurityRuntime Class | Novalys.VisualGuard.Security Namespace | VGSecurityRuntime.ValidateUser Overload List