Sun Java System Access Manager 2005Q1 Developer's Reference |
Chapter 1
Type and Structure ReferenceThis chapter covers the types and structures provided in the C SDK available for use to interact with Sun Java System Access Manager 6 2005Q1. All authentication related types and structures can be found in the C SDK include file am_auth.h. The following structures are summarized in this chapter:
am_auth_callbackPrimary callback structure for authentication.
This structure is a C implementation of the Java 2 SDK javax.security.auth.callback interface used to submit authentication requirements to the authentication service on the Access Manager. The Access Manager authentication service framework is based on the Java 2 SDK JAAS API.
Syntax
#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;Fields
This structure has the following fields:
am_auth_choice_callbackChoice authentication callback structure.
This is a C implementation of the javax.security.auth.callback.ChoiceCallback class used to submit authentication callback requirements to the Access Manager Authentication service.
Syntax
#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;Fields
This structure should be used if the callback_type is ChoiceCallback used to submit authentication callback requirements to the Access Manager authentication service.
It is a C implementation of the javax.security.auth.callback.ChoiceCallback class.
It has the following fields:
Details
See am_auth_test.c in the C SDK samples for an example of how to use the choice callback.
am_auth_confirmation_callback_infoConfirmation 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;Fields
This structure has the following fields:
Details
See am_auth_test.c in the C SDK samples for an example of how to use the confirmation callback.
am_auth_language_callback_infoLanguage callback structure.
Syntax
#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;Fields
This structure has the following fields:
am_auth_localeLanguage locale structure.
Syntax
#include "am_auth.h"
typedef struct am_auth_locale {
const char *language;
const char *country;
const char *variant;
} am_auth_locale_t;Fields
This structure has the following fields:
Details
See am_auth_test.c in the C SDK samples for an example of how to use this structure with the locale callback.
am_auth_name_callback_infoName callback structure.
This is a C implementation of the javax.security.auth.callback.NameCallback class used to submit authentication callback requirements to the Access Manager authentication service.
Syntax
#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;Fields
This structure has the following fields:
Details
See am_auth_test.c in the C SDK samples for an example of how to use the name callback.
am_auth_password_callback_infoPassword callback structure.
This is a C implementation of the javax.security.auth.callback.PasswordCallback class used to submit authentication callback requirements to the Access Manager authentication service.
Syntax
#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;Fields
This structure has the following fields:
Details
See am_auth_test.c in the C SDK samples for an example of how to use the password callback.
am_auth_text_input_callback_infoText Input authentication callback structure.
This is a C implementation of the javax.security.auth.callback.TextInputCallback class used to submit authentication callback requirements to the Access Manager authentication service.
Syntax
#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;Fields
This structure has the following fields:
Details
See am_auth_test.c in the C SDK samples for an example of how to use the password callback.
am_auth_text_output_callback_infoText Output callback structure.
Syntax
#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;Fields
This structure has the following fields:
Details
See am_auth_test.c in the C SDK samples for an example of how to use the text output callback.
am_log_recordLog Record
Syntax
#include "am_log.h"
typedef struct am_log_record *am_log_record_t;Fields
This is an opaque structure and therefore has no fields accessible by the C SDK user.
Details
See am_log_test.c in the C SDK samples for an example of how to use the text output callback.
am_map_tOpaque handle to a map object. A map object is used to manipulate key value pairs using the am_map_* interface. Map objects are used by the policy interface in the C SDK to return any policy decision results and advices from Access Manager policy service, and to pass any environment variables for to the policy interface for policy evaluation.
Syntax
#include "am_map.h"
typedef struct am_map *am_map_t;
Fields
This is an opaque structure and therefore has no fields accessible by the C SDK user.
Details
See am_policy_test.c in the C SDK samples for an example of how to use am_map_t.
am_map_entry_iterOpaque handle to an iterator for the entries in a map object.
Syntax
#include "am_map.h"
typedef struct am_map_entry_iter *am_map_entry_iter_t;Fields
This is an opaque structure and therefore has no fields accessible by the C SDK user.
Details
See am_policy_test.c in the C SDK samples for an example of how to use am_map_entry_iter.
am_map_value_iterOpaque handle to an iterator for the entries in a map object am_map_t. A map object is used to manipulate key value pairs using the am_map_* interface. Map objects are used by the policy interface in the C SDK to return any policy decision results and advices from Access Manager policy service, and to pass any environment variables for policy evaluation.
Syntax
#include "am_map.h"
am_map_value_iter *am_map_value_iter_t;Fields
This is an opaque structure and therefore has no fields accessible by the C SDK user.
Details
See am_policy_test.c in the C SDK samples for an example of how to use am_map_entry_iter_t.
am_policy_resultPolicy evaulation results from the policy interface in the C SDK.
Memory for am_policy_result is allocated by am_policy_evaluate() in the C SDK and should be freed by calling am_policy_result_destroy().
Syntax
#include "am_policy.h"
typedef struct am_policy_result {
const char *remote_user;
const char *remote_IP;am_map_t advice_map;
am_map_t attr_response_map;
} am_policy_result_t;Fields
This structure has the following fields:
Field
Description
remote_use
The remote user.
remote_IP
The remote IP.
advice_map
Any policy advices
attr_response_map
Any user attributes.
Details
See am_policy_test.c in the C SDK samples for an example of how to use am_policy_result_t in the policy interfaces.
am_properties_iter
am_resource_traitsStructure for traits of policy resources (such as URLs) to be evaluated.
The traits are used by the policy interfaces in the C SDK to determine how to compare and canonicalize policy resources to reach a policy decision during policy evaluation.
Syntax
#include "am_policy.h"
typedef struct am_resource_traits {
am_resource_match_t (*cmp_func_ptr)(const struct am_resource_traits v*rsrc_traits,
const char *policy_res_name,
const char *resource_name,
boolean_t use_patterns);
boolean_t (*has_patterns)(const char *resource_name);
boolean_t (*get_resource_root)(const char *resource_name,
char *root_resource_name,
size_t buflength);
boolean_t ignore_case;
char separator;
void (*canonicalize)(const char *resource, char **c_resource);
void (*str_free)(void *resource_str);
} am_resource_traits_t;Fields
This structure has the following fields:
Details
See am_policy_test.c in the C SDK samples for an example of how this structure is used.
am_string_set_tStructure for containing a set of strings used by various interfaces in the SDK.
The am_string_set_allocate() and am_string_set_destroy() interfaces can be used to allocate and free space for this structure.
Syntax
#include "am_string_set.h"
typedef struct {
int size;
char **strings;
} am_string_set_t;
Fields
This structure has the following fields:
Details
See C SDK samples for examples of how this structure is used.