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

am_web_do_cookie_domain_set()

Sets the OpenSSO Enterprise cookie (called iPlanetDirectoryPro) for each domain configured in the com.sun.am.policy.agents.config.cookie.domain.list property in the agent configuration properties.

Details

am_web_do_cookie_domain_set() builds the set-cookie header for each domain, and calls the callback function declared in setFunc to set the cookie. In CDSSO, the callback function is called by am_web_check_cookie_in_query() and am_web_check_cookie_in_post() to set the cookie in the response.

Syntax

#include "am_web.h"
AM_WEB_EXPORT am_status_t
am_web_do_cookie_domain_set(am_status_t (*setFunc)(
                                         const char *, 
                                         void **),
                                         void **args, 
                                         const char *cookie
                                         void* agent_config);

Parameters

This function takes the following parameters:

setFunc

Function pointer with which the user can define their own function for setting the cookie in the foreign domain. The implementation defines the parameters.

args

Pointer to a pointer to agent defined parameters.

cookie

Pointer to the cookie.

agent_config

An agent configuration instance returned by am_web_get_agent_configuration(). This parameter should not be NULL.

Returns

This function returns a value of the am_status_t enumeration (defined in the <am_types.h> header file).