Sun Java System Access Manager 7 2005Q4 C API Reference

am_auth_confirmation_callback_info

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.

Syntax

#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;

Members

This structure has the following members:

prompt

Prompt to describe the options, if any.

message_type

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( ).

option_type

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().

options

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().

options_size

Number options in the options list.

default_option

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().

response

The selected option.

Memory for the response must be allocated and freed by the caller.

Details

See am_auth_test.c in the C SDK samples for an example of how to use the confirmation callback.