Confirmation authentication callback structure.
This is a C implementation of the javax.security.auth.callback.ConfirmationCallback class used to submit authentication callback requirements to the Access Manager authentication service.
#include "am_auth.h" typedef struct am_auth_confirmation_callback_info { const char *prompt; const char *message_type; const char *option_type; const char **options; size_t options_size; const char *default_option; const char *response; /* selected index */ } am_auth_confirmation_callback_t;
This structure has the following members:
Prompt to describe the options, if any.
The message type: INFORMATION, WARNING or ERROR.
Memory for the message type is allocated by the C SDK in am_auth_login() and freed when the authentication context is destroyed using am_auth_destroy_auth_context( ).
The option type: YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION, or UNSPECIFIED.
Memory for the message type is allocated by the C SDK in am_auth_login() and freed when the authentication context is destroyed using am_auth_destroy_auth_context().
The list of confirmation options, or null if this ConfirmationCallback was instantiated with an optionType instead of options.
Memory for the options list is allocated by the C SDK in am_auth_login() and freed when the authentication context is destroyed using am_auth_destroy_auth_context().
Number options in the options list.
The default option, if any.
Memory for the default option is allocated by the C SDK in am_auth_login() and freed when the authentication context is destroyed using am_auth_destroy_auth_context().
The selected option.
Memory for the response must be allocated and freed by the caller.
See am_auth_test.c in the C SDK samples for an example of how to use the confirmation callback.