Sun Java System Access Manager 7.1 C API Reference

am_auth_confirmation_callback_t

Requests YES/NO, OK/CANCEL, YES/NO/CANCEL or similar confirmations.

Details

am_auth_confirmation_callback_t is a C implementation of the Java javax.security.auth.callback.ConfirmationCallback class.

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

prompt

Pointer to the user's prompt.

message_type

Pointer to the message type defined as INFORMATION, WARNING or ERROR.

option_type

Pointer to the option type defined as YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION, or UNSPECIFIED.

options

Pointer to a pointer to a list of confirmation options, or NULL if the callback was instantiated with an option_type.

options_size

Takes a value based on the size_t defined in the standard <stddef.h> header file that reflects the number of options in the list.

default_option

Pointer to the option selected by default when the list is displayed.

response

Pointer to the choice returned to Access Manager.

Memory Concerns

Memory is allocated by am_auth_login(), and freed by calling am_auth_destroy_auth_context(). Memory for the response must be allocated and freed by the caller.