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

am_auth_login()

Begins the login process given the index type and its value.

Syntax

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

Parameters

This function takes the following parameters:

auth_ctx

The am_auth_context_t type.


Note –

See am_auth_context_t for information.


auth_idx

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;
value

Pointer to the authentication module being used.


Note –

See Sun OpenSSO Enterprise 8.0 Administration Guide for more information on authentication modules.


Returns

This function returns one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):

AM_SUCCESS

If the login process was successfully completed.

AM_INVALID_ARGUMENT

If the auth_ctx or value parameter is NULL.

AM_FEATURE_UNSUPPORTED

If the auth_idx parameter is invalid.