Fn duo_open is used to obtain a handle to the Duo service. Fa ikey and Fa skey are the required integration and secret keys, respectively, for a Duo customer account. Fa progname identifies the program to the Duo service.
Fn duo_set_conv_funcs may be used to override the internal user conversation functions. Fa conv_prompt is called to present the user a login menu and Fa prompt , and gather their response, returning Fa buf or NULL on error. It may be set to NULL if automatic login is specified with DUO_FLAG_AUTO. Fa conv_status is called to display status messages to the user, and may be NULL if no status display is needed. Fa conv_arg is passed as the first argument to these conversation functions.
Fn duo_set_host may be used to override the default Duo API host.
Fn duo_set_ssl_verify may be used to override SSL certificate verification (enabled by default).
Fn duo_login performs secondary authentication via the Duo service for the specified Fa username Ns . Fa client_ip is the source IP address of the connection to be authenticated, and may be NULL if unknown. The following bitmask values are defined for Fa flags :
Fn duo_geterr returns a description of the last-seen error on the specified Duo API handle. The returned constant string should not be modified or freed by the caller.
Fn duo_close closes and frees the specified Duo API handle.
Fn duo_login returns status codes of type Ft duo_code_t , which may have the following values:
In the event of a DUO_*_ERROR return, duo_geterr may be called to recover a human-readable error message.
Fn duo_geterr returns a constant string which should not be modified or freed by the caller.