logout

void logout()
void logout(Attribute attribute)

Performs the following functions:

>Releases the license authorization.

>Logs the license usage

>Allows passing additional values for specific purposes at the time of releasing a license authorization.

NOTE   The logout API returns success even if the feature time slice has expired.

Additional Information

This API is called when the user has finished using the feature. The APIs are stateless in the case of cloud licensing, so there is no need to free any resources using the logout API. However, it is important to call this API, in a match with the login API, to log the license usage.

Special Cases

>If the licensed application exits without calling the logout API (such as in the case of browser crash), the actual session logout time will not be updated in the usage logs. It is the vendor's decision to account for such incomplete or abandoned sessions. A fixed session period could be assumed for such cases (for billing purposes). This period needs to be set on the Sentinel Cloud Connect side. Contact the Thales Support Team for assistance.

>In the case of licenses with limited concurrency, if the logout API is called while the Sentinel Cloud Connect is down, the license will be released automatically after a pre-defined period. The default value is 24 hours and can be configured by Thales. For count-based licenses, one count will be consumed and currently this is not configurable by the vendor.

Parameters

Parameter Description
attribute [in]

The attribute object.

The attributes that can be set are described below.

Attributes

The table below provides details about the attributes that can be set by using the LicensingConstants class:

Attribute for... Key and Description
Setting the usage count multiplier

>Attribute Key - SNTL_ATTR_LOGOUT_USAGE_ COUNT_MULTIPLIER

>Optional

>This attribute is used to specify the number of usage count to be consumed or returned in a logout call.

>By default, a login-logout session consumes one usage count and this count is acknowledged during the login call. At times, a vendor may want to specify a count more than one, which can be specified at the start of the session (login), in-between the session (refresh), and/or at the end of the session (logout). To consume a usage count more than one for a given session, set the usage count multiplier. A negative value can also be specified to return the unconsumed count at the logout time.

>Its value can be any integer in the range of -2,147,483,647 to 2,147,483,647. The maximum value includes the grace limit value. The default value is 1 for the login API and 0 for the logout and refresh APIs.

NOTE   You cannot provide the 0 value explicitly in the usage count multiplier of logout and refresh APIs.

>The total usage count for a particular session is calculated by adding the usage count multiplier values specified in the login, refresh, and logout APIs. By default, a login-refresh-logout combination consumes one (1+0+0) usage count.

>If the negative usage count multiplier provided in the logout API is more than the actual session usage count, the negative usage count value is reduced to the actual usage count in the session. Say 10 usage count is requested in login and -20 is provided in logout. Since maximum count that can be returned is 10, the -10 value is considered at logout instead of -20.

>The usage count multiplier value is used for licenses where usage limit is defined. The usage count multiplier value cannot exceed the sum of usage limit and grace limit.

>The usage count consumed by a session is visible in all EMS reports.

Instead of logout, provide usage count multiplier in the refresh call:

It is not recommended to provide the usage count multiplier in the logout call. When provided in the logout call, in the case of limited usage, no error is returned even if the usage has been exhausted.

Exception Handling

If unsuccessful, throws LicensingException.