Sun Java System Access Manager 7 2005Q4 C API Reference

am_auth_create_auth_context()

Creates a new auth context and returns the handle.

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 handle of the auth context.

org_name

Organization name to authenticate to. May be NULL to use value in property file.

cert_nick_name

The alias of the certificate to be used if the client is connecting securely. May be NULL in case of non-secure connection.

url

Service URL, for example:

http://pride.red.iplanet.com:58080/amserver

May be NULL, in which case the naming service URL property is used.

Returns

This function returns am_status_t with one of the following values:

AM_SUCCESS

If auth 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