ProGet SDK Reference
Version:

TryGetAndValidateUser(string userName, string password) Method

Returns a IUserDirectoryUser for the user with the specified user name and password.

Syntax

public virtual IUserDirectoryUser TryGetAndValidateUser(string userName, string password)

Parameters

userName
Type: string

The user name of the user to look up.

password
Type: string

The password of the user.

Returns

A corresponding IUserDirectoryUser for the specified user name, if the user was found in the directory and the specified password is correct; otherwise null (Nothing in Visual Basic).

Exceptions

System.ArgumentNullException

userName is null (Nothing in Visual Basic) or empty or password is null (Nothing in Visual Basic).