login()

This method attempts to log the user into the Lawson system. If the login attempt fails, it throws a LawsonHttpClientException.

login() parameters

login() takes the parameters shown in the following tables. There are three possible sets of parameters that can be used.

login(protocol, host, port, username, password)

Parameter Type What it contains
protocol String The protocol, HTTP or HTTPS.
host String The name of the host the user is attempting to access.
port int The port number to use for access.
username String The name of the user that is attempting to log in. It must be an established user on the Lawson server.
password String The password of the user that is attempting to log in.

login(host, port, username, password)

In this case, the API will assume the protocol is HTTP.

Parameter Type What it contains
host String The name of the host the user is attempting to access.
port int The port number to use for access.
username String The name of the user that is attempting to log in. It must be an established user on the Lawson server.
password String The password of the user that is attempting to log in.

login(url, username, password)

In this case, the API will parse the URL parameter to determine the protocol, host, and port.