Login Method

Description

Authorizes the user. On success, the user is logged in and can connect to projects.

Starting in ALM 14.00, the authorization is not handled by ALM but by an external Identity Manager (IdM) and Identity Provider (IdP).

The Login method is supported for backward compatibility and requires referencing IdmClientSdk.dll and IdmSdkWrapper.dll.

To take advantage of the new authentication mechanism, develop your own authentication flow to acquire a LWSSO token from the IdP and IdM that manage authentication (see Acquire an authentication token to use for ALM APIs). Use the token you acquire to call InitConnectionWithCookiesEx Method instead of using this Login method.

Note: If ALM runs in non-SSO mode:

  • In ALM 15.00, you can use this API to login with your username and password.
  • In ALM 15.0.1 or later, you can use this API to login with either your username and password or your API key and API key secret.

If ALM runs in SSO mode:

  • In ALM 15.00, you cannot use this API to login. Use the API InitConnectionWithApiKey Method to login with your API key and API key secret.
  • In ALM 15.0.1 or later, you can use this API to login with your API key and API key secret.
Syntax
Visual Basic
Public Sub Login( _
   ByVal UserName As String, _
   ByVal Password As String _
) 
Parameters

See the following table for the username and password parameters.

ALM versionSSO modeNon-SSO mode
14.x

Supports login with the one of the following pairs of username and password:

  • IdP name and IdP password
  • API key and API key secret
NA
12.5x, 12.60NA

Supports login with the one of the following pairs of username and password:

  • ALM username and password
  • If an LWSSO token is passed as the username, pass an empty string as the password.
15.00

Supports login with the one of the following pairs of username and password:

  • If an LWSSO token is passed as the username, pass an empty string as the password.
  • If an empty string is passes as the username, pass an LWSSO token as the password.

Note: If you want to login with API key and API key secret, you can use the InitConnectionWithApiKey Method API .

Supports login with the one of the following pairs of username and password:

  • ALM username and password
  • If an LWSSO token is passed as the username, pass an empty string as the password.
  • If an empty string is passes as the username, pass an LWSSO token as the password.
15.0.1

Supports login with the one of the following pairs of username and password:

  • If an LWSSO token is passed as the username, pass an empty string as the password.
  • If an empty string is passes as the username, pass an LWSSO token as the password.
  • API key and API key secret

Supports login with the one of the following pairs of username and password:

  • ALM username and password
  • If an LWSSO token is passed as the username, pass an empty string as the password.
  • If an empty string is passes as the username, pass an LWSSO token as the password.
  • API key and API key secret
Remarks

Before authenticating a user with Login, connect to the server with InitConnectionEx.

After a successful call to Login, the user is authenticated on the server, but not connected to any project. Therefore, the LoggedIn Property and the Connected Property are True and the ProjectConnected Property is False.

For a table of properties affected by the state of the connection, see the Remarks for the TDConnection object.

See Also