Primary callback type for authentication.
am_auth_callback_t interacts with the calling application, allowing for the retrieval of specific authentication data (such as user name and password), or the display of error, warning or informational messages. It does not technically retrieve or display the information but provides the means to pass requests between an application and the OpenSSO Enterprise Authentication Service. struct am_auth_callback is a C implementation of 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/.
#include "am_auth.h" typedef struct am_auth_callback { am_auth_callback_type_t callback_type; union am_auth_callback_info { am_auth_choice_callback_t choice_callback; am_auth_confirmation_callback_t confirmation_callback; am_auth_language_callback_t language_callback; am_auth_name_callback_t name_callback; am_auth_password_callback_t password_callback; am_auth_text_input_callback_t text_input_callback; am_auth_text_output_callback_t text_output_callback; } callback_info; } am_auth_callback_t;
Indicates the kind of callback that will be used. Each callback_type has a defined structure with a response field to submit authentication credentials. The value of callback_type determines the member of the union defined for the callback_info member. The possible values are defined in the enumeration:
typedef enum am_auth_callback_type { ChoiceCallback = 0, ConfirmationCallback, LanguageCallback, NameCallback, PasswordCallback, TextInputCallback, TextOutputCallback } am_auth_callback_type_t;
Each callback_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/.
Represents the defined callback_type. More information on the specific callbacks can be found in Authentication Callback Data Types.
Memory for the callback members is allocated in the am_auth_login() call, and freed in the am_auth_destroy_auth_context() call. Memory for the response field, though, must be allocated and freed by the caller.