Click or drag to resize

UserManagementServiceloginExt Method

Log in with the specified user name.

Namespace:  (Default Namespace)
Assembly:  SeniorSystemsWS (in SeniorSystemsWS.dll) Version: 937.0.0.0 (937.0.0.33)
Syntax
public ResultLogin loginExt(
	string username,
	string password
)

Parameters

username
Type: SystemString
The user name.
password
Type: SystemString
The password.

Return Value

Type: ResultLogin

A ResultLogin object which contains these members.

Remarks
Success or failure is obtained by checking ResultLogin.Status which contains one of these values.

A successful login (non-error) will contain an Authorization Key in ResultLogin.AuthKey.

Authentication keys are only valid for a limited time. See the renewToken method for more information.

For a list of possible errors and warnings, see ResultLogin.ErrorType.

Examples
UserManagementServiceSoapClient ums = new UserManagementServiceSoapClient();

ResultLogin result = ums.loginExt(userName, password);

if (result.Status == ResultStatusOKErrorWarning.StatusError)
{
    // Unable to log in
    return;
}
else if (result.Status == ResultStatusOKErrorWarning.StatusWarning)
{
    string message = "Login Warning:" + "\r\n";

    if (result.ErrorType != null)
        foreach (ResultLoginErrors error in result.ErrorType)
            message = message + "\r\n" + error.ToString();

    if (result.Message != String.Empty)
        message = message + "\r\n" + result.Message;

    // Log in OK, but there was a warning.  
    // message contains the list of warnings
}

// OK, store authorization key and continue.
string authKey = result.AuthKey;
See Also