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

am_web_set_cookie()

Sets the specified cookie in the cookie header of the request.

Syntax

#include "am_web.h"
AM_WEB_EXPORT am_status_t
am_web_set_cookie(char *cookie_header,
                  const char *set_cookie_value, 
                  char **new_cookie_header);

Parameters

This function takes the following parameters:

cookie_header

Pointer to the cookie header.

set_cookie_value

Pointer to the cookie name and value in the set-cookie response header form. This value should be the same as that of the cookieValues parameter of the am_web_result_set_header_attr_in_request_func_t function.

new_cookie_header

Pointer to a pointer to the original cookie header, or a new cookie header value which needs to be freed by the caller. This value can be NULL.

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 successful.

AM_*

The type of error indicated by the status value.