ASP.NET VETtrak API web services
ContentsIndexHome
PreviousUpNext
VT_API.ValidateUser Method

Validate a User. 

A User attempts to authenticate by passing a username and password. 

The User can be of type Client or Staff. The User's Type is returned in the TokenType property of the result. 

If authentication is successful, a Token is generated, and a TAuthenticate is returned with the properties:

  • Token = generated Token,
  • Status = STATUS_OK = 1,
  • StatusMessage = 'Success',
  • Identifier = Identifier of User,
  • TokenType = Type of user.
 

If authentication is unsuccessful, no Token is generated, and a TAuthenticate is returned with the properties:

  • Token = '',
  • Status = STATUS_ERROR = -1,
  • StatusMessage = 'Invalid Username/Password Combination.',
  • Identifier = BAD_IDENTIFIER = '-1',
  • TokenType = ''.
 

Many functions performing operations with sensitive data, require a Token and return an Authenticate Object. The Token generated in this function should be passed to other functions requiring a Token. 

This function is the same as ValidateClient

This function has security level "Public", and can be accessed by anyone without authentication.

C#
[WebMethod(Description = "Validates a login and returns a token")]
public TAuthenticate ValidateUser(string sUsername, string sPassword);
Parameters 
Description 
string sUsername 
String containing User Name of User. Maximum length 50 characters. 
string sPassword 
String containing Password of User. Maximum length 50 characters. 

TAuthenticate : an Authenticate Object containing the result of the validation.

Copyright (c) VETtrak 2022. All rights reserved.