Checks if credentials are valid but does not load security permissions or change current principal.
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 CheckCredential( string name, string password, VGAuthenticationMode mode ) |
Visual Basic |
---|
Public Function CheckCredential ( name As String, password As String, mode As VGAuthenticationMode ) As VGAuthenticationState |
Parameters
- name
- Type: System..::..String
the name of the user.
- password
- Type: System..::..String
the password of the user
- mode
- Type: Novalys.VisualGuard.Security..::..VGAuthenticationMode
A VGAuthenticationMode value indicating the authentication mode used to validate the user.
Return Value
Type: VGAuthenticationStatetrue if the credentials are valid, false otherwise.
Remarks
this method does not update credential statistic
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentException | The value of mode is equal to None or is a combination of several modes.
- or- the name is an empty string or is longer than 64 characters or contains invalid chars ('\', '/', '?', '*', '%', ';', ''', '"', ':', '|', '[', ']', '+', '=', ',').- or- the password is longer than 64 characters. |
System..::..ArgumentNullException | The name or the password is null (Nothing in VB) and the mode is not Windows. |
System..::..NotSupportedException | the repository does not support Visual Guard authentication mode. The name is empty. |
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. |