Share this page

# lrt_tpchkauth

Client/Server Session Functions

Checks if the application configuration requires authentication.

int lrt_tpchkauth( );

The lrt_tpchkauth function checks if the application configuration requires authentication. This is typically used by application clients prior to calling lrt_tpinitialize, to determine if a password is required.

## Return Values

If the function succeeds, it returns one of the following non-negative values:

- TPNOAUTH - no authentication required
- TPSYSAUTH - requires system authentication only
- TPAPPAUTH - both system and application-specific authentication are required

If the function ends with an error, it returns -1 and sets the error code in tperrno return values.

## Parameterization

Parameterization is not applicable to this function.

## Example

In the following example, lrt_tpchkauth checks whether the authentication is required.

Copy code

    if (lrt_tpchkauth() == TPNOAUTH)
    lrt_output_message("No authentication required.");

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: