Verifies that the supplied user name and password are valid.
Namespace: Novalys.VisualGuard.SecurityAssembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2017.0.101.17 (2017.0.101.17)
Syntax
C# |
---|
public VGAuthenticationState ValidateUser( string username, string password, VGAuthenticationMode mode ) |
Visual Basic |
---|
Public Function ValidateUser ( username As String, password As String, mode As VGAuthenticationMode ) As VGAuthenticationState |
Parameters
- username
- Type: System..::..String
The name of the user to be validated.
- password
- Type: System..::..String
The password for the specified user.
- mode
- Type: Novalys.VisualGuard.Security..::..VGAuthenticationMode
A VGAuthenticationMode value indicating the authentication mode used to validate the user.
Return Value
Type: VGAuthenticationStatea 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(String, String, VGAuthenticationMode) to authenticate the current user.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | username or password is null. |
System..::..ArgumentException | username is empty or contains invalid chars ('\', '/', '?', '*', '%', ';', ''', '"', ':', '|', '[', ']', '+', '=', ',').
or username or password is longer than 64 characters. |
Novalys.VisualGuard.Security..::..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. |