This section contains further details on the callback types as discussed in am_auth_callback_t. They are:
Each type corresponds to the callback class of the same name in the Java javax.security.auth.callback package. The Java API Reference for this package can be found at http://java.sun.com/j2se/1.5.0/docs/api/.
Displays a list of choices and submits the selection back to the Access Manager Authentication Service.
am_auth_choice_callback_t is a C implementation of the Java javax.security.auth.callback.ChoiceCallback class.
#include "am_auth.h" typedef struct am_auth_choice_callback { const char *prompt; boolean_t allow_multiple_selections; const char **choices; size_t choices_size; size_t default_choice; const char **response; /* selected indexes */ size_t response_size; } am_auth_choice_callback_t;
Pointer to the user's prompt.
Takes a value based on the boolean_t defined in the <am_types.h> header file. Set to B_TRUE if multiple selections can be made.
Pointer to a pointer to the strings for the different choices.
Value based on the size_t defined in the standard <stddef.h> header file that reflects the number of choices in the list.
Takes a value based on the size_t defined in the standard <stddef.h> header file that reflects the choice selected by default when the list is displayed.
Pointer to a pointer to the choice(s) returned to Access Manager.
Takes a value based on the size_t defined in the standard <stddef.h> header file that reflects the number of selected choices in the response.
Memory for the choices list 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.
Requests YES/NO, OK/CANCEL, YES/NO/CANCEL or similar confirmations.
am_auth_confirmation_callback_t is a C implementation of the Java javax.security.auth.callback.ConfirmationCallback class.
#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;
Pointer to the user's prompt.
Pointer to the message type defined as INFORMATION, WARNING or ERROR.
Pointer to the option type defined as YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL_OPTION, or UNSPECIFIED.
Pointer to a pointer to a list of confirmation options, or NULL if the callback was instantiated with an option_type.
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.
Pointer to the option selected by default when the list is displayed.
Pointer to the choice returned to Access Manager.
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.
Retrieves the locale for localizing text.
am_auth_language_callback_t is a C implementation of the Java javax.security.auth.callback.LanguageCallback class.
See am_auth_locale_t for the individual components.
#include "am_auth.h" typedef struct am_auth_language_callback_info { am_auth_locale_t *locale; am_auth_locale_t *response; /* locale */ } am_auth_language_callback_t;
Pointer to the am_auth_locale_t object defining the locale.
Pointer to the am_auth_locale_t object being submitted back to Access Manager.
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.
Retrieves user name information.
am_auth_name_callback_t is a C implementation of the Java javax.security.auth.callback.NameCallback class.
#include "am_auth.h" typedef struct am_auth_name_callback_info { const char *prompt; const char *default_name; const char *response; /* name */ } am_auth_name_callback_t;
Pointer to the user's prompt.
Pointer to the default name displayed with the user prompt, if any.
Pointer to the name submitted back to Access Manager.
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.
Retrieves user password information.
am_auth_password_callback_t is a C implementation of the Java javax.security.auth.callback.PasswordCallback class.
#include "am_auth.h" typedef struct am_auth_password_callback_info { const char *prompt; boolean_t echo_on; const char *response; /* password */ } am_auth_password_callback_t;
Pointer to the user's prompt.
Takes a value based on the boolean_t defined in the <am_types.h> header file. Set to B_TRUE to display the password as it is typed.
Pointer to the password submitted back to Access Manager.
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.
Retrieves generic textual information.
am_auth_text_input_callback_t is a C implementation of the Java javax.security.auth.callback.TextInputCallback class.
#include "am_auth.h" typedef struct am_auth_text_input_callback_info { const char *prompt; const char *default_text; const char *response; /* text */ } am_auth_text_input_callback_t;
Pointer to the user's prompt.
Pointer to the default text to be displayed with the user prompt.
Pointer to the text submitted back to Access Manager.
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.
Displays information messages, warning messages, and error messages.
am_auth_text_output_callback_t is a C implementation of the Java javax.security.auth.callback.TextOutputCallback class.
#include "am_auth.h" typedef struct am_auth_text_output_callback_info { const char *message; const char *message_type; } am_auth_text_output_callback_t;
Pointer to the message to be displayed.
Pointer to the message type: INFORMATION, WARNING, or ERROR.
Memory is allocated by am_auth_login(), and freed by calling am_auth_destroy_auth_context().