Sun OpenSSO Enterprise 8.0 C API Reference for Application and Web Policy Agent Developers

am_auth_create_auth_context()

Creates the context for the authentication and a pointer to it.

Syntax

#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);

Parameters

This function takes the following parameters:

auth_ctx

Pointer to the am_auth_context_t type.


Note –

See am_auth_context_t for information.


org_name

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 agent configuration properties.

cert_nick_name

Pointer to the alias of the certificate being used if the application will connect securely to OpenSSO Enterprise. May be NULL if the connection is not secure.

url

Pointer to the OpenSSO Enterprise Naming Service URL. May be NULL to use the Naming Service URL defined in the agent configuration properties.

Returns

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):

AM_SUCCESS

If the authentication context was successfully created.

AM_NO_MEMORY

If unable to allocate memory for the handle.

AM_INVALID_ARGUMENT

If the auth_ctx parameter is NULL.

AM_AUTH_CTX_INIT_FAILURE

If the authentication initialization failed.