The authentication functions defined in <am_auth.h> are:
Aborts an authentication process that has not been completed.
#include "am_auth.h" AM_EXPORT am_status_t am_auth_abort(am_auth_context_t auth_ctx);
This function takes the following parameter:
The am_auth_context_t type.
See am_auth_context_t for information.
This function returns one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):
If the process was successfully stopped.
If the auth_ctx parameter is NULL.
Creates the context for the authentication and a pointer to it.
#include "am_auth.h" AM_EXPORT am_status_t am_auth_create_auth_context(am_auth_context_t *auth_ctx, const char *org_name, const char *cert_nick_name, const char *url);
This function takes the following parameters:
Pointer to the am_auth_context_t type.
See am_auth_context_t for information.
Pointer to the name of the organization for which the authentication context is being initialized. May be NULL to use the value defined in the AMAgent.properties file.
Pointer to the alias of the certificate being used if the application will connect securely to Access Manager. May be NULL if the connection is not secure.
Pointer to the Access Manager Naming Service URL. May be NULL to use the Naming Service URL defined in the AMAgent.properties file.
This function returns a pointer to the authentication context object and one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):
If the authentication context was successfully created.
If unable to allocate memory for the handle.
If the auth_ctx parameter is NULL.
If the authentication initialization failed.
Eliminates the specified authentication context.
#include "am_auth.h" AM_EXPORT am_status_t am_auth_destroy_auth_context(am_auth_context_t auth_ctx);
This function takes the following parameter:
The am_auth_context_t type.
See am_auth_context_t for information.
This function returns one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):
If the pointer was successfully destroyed.
If the auth_ctx parameter is NULL.
Retrieves the appropriate callback structure to populate with authentication requirements.
#include "am_auth.h" AM_EXPORT am_auth_callback_t * am_auth_get_callback(am_auth_context_t auth_ctx, size_t index);
This function takes the following parameters:
The am_auth_context_t type.
See am_auth_context_t for information.
Takes a value based on size_t defined in the standard <stddef.h> header file that initializes the index into the callback array.
This function returns a pointer to the am_auth_callback_t type. See am_auth_callback_t for more information.
Retrieves the authentication module plug-in instances configured for the organization (or sub-organization) defined in the am_auth_context_t type.
Module instance names are retrieved in pointer to a pointer to a am_string_set_t type (as defined in the <am_string_set.h> header file).
#include "am_auth.h" AM_EXPORT am_status_t am_auth_get_module_instance_names(am_auth_context_t auth_ctx, am_string_set_t** module_inst_names_ptr);
This function takes the following parameters:
The am_auth_context_t type.
See am_auth_context_t for information.
Pointer to a pointer to the am_string_set_t type.
This function returns a pointer to a pointer with the list of module instance names (or NULL if the number of configured modules is zero) and one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):
If the submitted requirements were processed successfully.
If the authentication process failed.
If the auth_ctx parameter is NULL.
If the Access Manager Authentication Service is not initialized.
The implementation takes care of allocating memory for the module_inst_names_ptr.
Retrieves the organization to which the user is authenticated.
#include "am_auth.h" AM_EXPORT const char * am_auth_get_organization_name(am_auth_context_t auth_ctx);
This function takes the following parameter:
The am_auth_context_t type.
See am_auth_context_t for information.
This function returns a pointer with one of the following values:
After the user successfully logs in.
If there was an error or the user has not successfully logged in.
Retrieves the session identifier for the authenticated user.
The SSOTokenID is a randomly-generated string that represents an authenticated user. See Single Sign-on Token Handles for more information.
#include "am_auth.h" AM_EXPORT const char * am_auth_get_sso_token_id(am_auth_context_t auth_ctx);
This function takes the following parameter:
The am_auth_context_t type.
See am_auth_context_t for information.
This function returns a pointer with one of the following values:
After the user successfully logs in.
If there was an error or the user has not successfully logged in.
Retrieves the state of the authentication process.
#include "am_auth.h" AM_EXPORT am_auth_status_t am_auth_get_status(am_auth_context_t auth_ctx);
This function takes the following parameter:
The am_auth_context_t type.
See am_auth_context_t for information.
This function returns one of the following values of the am_auth_status_t enumeration as defined:
typedef enum am_auth_status { AM_AUTH_STATUS_SUCCESS = 0, AM_AUTH_STATUS_FAILED, AM_AUTH_STATUS_NOT_STARTED, AM_AUTH_STATUS_IN_PROGRESS, AM_AUTH_STATUS_COMPLETED } am_auth_status_t;
The login process has failed.
The login process has not started.
The login is in progress.
The user has been logged out.
The user has logged in.
Checks to see if there are additional requirements needed to complete the login process.
am_auth_has_more_requirements() is invoked after the am_auth_login() call. If there are requirements to be supplied, the caller retrieves and submits the requirements in the form of callbacks.
#include "am_auth.h" AM_EXPORT boolean_t am_auth_has_more_requirements(am_auth_context_t auth_ctx);
This function takes the following parameter:
The am_auth_context_t type.
See am_auth_context_t for information.
This function returns one of the following values of the boolean_t enumeration (defined in the <am_types.h> header file):
If there are more requirements.
If there are no more requirements.
Initializes the authentication module using the pointer returned by am_auth_create_auth_context().
#include "am_auth.h" AM_EXPORT am_status_t am_auth_init(const am_properties_t auth_init_params);
This function takes the following parameter:
The am_properties_t type which contains the module initialization properties.
See am_properties_t for information.
This function returns one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):
If the initialization of the library is successful.
If unable to allocate memory during initialization.
If auth_init_params is NULL.
See am_status_t.
Begins the login process given the index type and its value.
#include "am_auth.h" AM_EXPORT am_status_t am_auth_login(am_auth_context_t auth_ctx, am_auth_index_t auth_idx, const char *value);
This function takes the following parameters:
The am_auth_context_t type.
See am_auth_context_t for information.
Defines the resource for which the authentication is being performed. Based on the am_auth_index_t enumeration used to initiate the login process:
typedef enum am_auth_idx { AM_AUTH_INDEX_AUTH_LEVEL = 0, AM_AUTH_INDEX_ROLE, AM_AUTH_INDEX_USER, AM_AUTH_INDEX_MODULE_INSTANCE, AM_AUTH_INDEX_SERVICE } am_auth_index_t;
Pointer to the authentication module being used.
See Authentication Module Types in Sun Java System Access Manager 7.1 Administration Guide for more information.
This function returns one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):
If the login process was successfully completed.
If the auth_ctx or value parameter is NULL.
If the auth_idx parameter is invalid.
Logs out the user.
#include "am_auth.h" AM_EXPORT am_status_t am_auth_logout(am_auth_context_t auth_ctx);
This function takes the following parameter:
The am_auth_context_t type.
See am_auth_context_t for information.
This function returns one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):
If the logout process was successfully completed.
If the auth_ctx parameter is NULL.
Retrieves the number of callbacks.
#include "am_auth.h" AM_EXPORT size_t am_auth_num_callbacks(am_auth_context_t auth_ctx);
This function takes the following parameters:
The am_auth_context_t type.
See am_auth_context_t for information.
This function returns a value based on the size_t defined in the standard <stddef.h> header file that reflects the number of callbacks.
Passes the responses populated in the callbacks to the Authentication Service.
#include "am_auth.h" AM_EXPORT am_status_t am_auth_submit_requirements(am_auth_context_t auth_ctx);
This function takes the following parameter:
The am_auth_context_t type.
See am_auth_context_t for information.
This function returns one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):
If the submitted requirements were processed successfully.
If the authentication process failed.
If the auth_ctx parameter is NULL.