Sun Java System Access Manager 7.1 C API Reference

Web Agent Data Types

The web agent data types defined in <am_web.h> are:

am_web_add_header_in_response_t

Defines a data type for the am_web_add_header_in_response_func_t function pointer.

Details

See also am_web_add_header_in_response_func_t.

Syntax

#include "am_web.h"
typedef struct {
    am_web_add_header_in_response_func_t func;
    void **args;
} am_web_add_header_in_response_t;

Members

The structure has the following components:

func

Pointer to am_web_add_header_in_response_func_t function.

args

Pointer to a pointer to agent defined parameters.

am_web_free_post_data_t

Defines a data type for the am_web_free_post_data_t function pointer.

Details

See also am_web_free_post_data_func_t.

Syntax

#include "am_web.h"
typedef struct {
    am_web_free_post_data_func_t func;
    void **args;
} am_web_free_post_data_t;

Members

am_web_free_post_data_t has the following components:

func

Pointer to am_web_free_post_data_func_t function.

args

Pointer to a pointer to agent defined parameters.

am_web_get_post_data_t

Defines a data type for the am_web_get_post_data_t function pointer.

Details

See also am_web_get_post_data_func_t.

Syntax

#include "am_web.h"
typedef struct {
    am_web_get_post_data_func_t func;
    void **args;
} am_web_get_post_data_t;

Members

am_web_get_post_data_t has the following components:

func

Pointer to am_web_get_post_data_func_t function.

args

Pointer to a pointer to agent defined parameters.

am_web_postcache_data_t

Data type for temporarily storing POST data sent by the web agent to the Access Manager Session Service.

Details

Policy agents use the POST method to communicate with the Session Service. For information, see Session Validation in Sun Java System Access Manager 7.1 Technical Overview.

Syntax

#include "am_web.h"
typedef struct am_web_postcache_data {
    char *value;
    char *url;
} am_web_postcache_data_t;

Members

am_web_postcache_data_t has the following components:

value

Pointer to the string value of the POST data.

url

Pointer to the destination URL of the POST.

am_web_render_result_t

Defines a data type for the am_web_render_result_func_t function pointer.

Details

See also am_web_render_result_func_t.

Syntax

#include "am_web.h"
typedef struct {
    am_web_render_result_func_t func;
    void **args;
} am_web_render_result_t;

Members

am_web_render_result_t has the following components:

func

Pointer to the am_web_render_result_func_t function.

args

Pointer to a pointer to agent defined parameters.

am_web_request_func_t

Defines an all-inclusive data type for the function pointers used by the web agent.

Syntax

#include "am_web.h"
typedef struct {
    am_web_get_post_data_t get_post_data;
    am_web_free_post_data_t free_post_data;
    am_web_set_user_t set_user;
    am_web_set_method_t set_method;
    am_web_set_header_in_request_t set_header_in_request;
    am_web_add_header_in_response_t add_header_in_response;
    am_web_render_result_t render_result;
} am_web_request_func_t;

Members

am_web_request_func_t has the following components:

get_post_data

See am_web_get_post_data_t.

free_post_data

See am_web_free_post_data_t.

set_user

See am_web_set_user_t.

set_method

See am_web_set_method_t.

set_header_in_request

See am_web_set_header_in_request_t.

add_header_in_response

See am_web_add_header_in_response_t.

render_result

See am_web_render_result_t.

am_web_request_params_t

Represents the parameters of an HTTP request passed to a web server from a client browser.

Details

This structure represents the parameters of the HTTP request and includes am_web_req_method_t which defines the action to be performed on the resource (GET, POST, DELETE, etc.).

Syntax

#include "am_web.h"
typedef struct {
    char *url;                      /* The full request URL */
    char *query;                    /* query string if any */
    am_web_req_method_t method;     /* request method */
    char *path_info;                /* path info if any */
    char *client_ip;                /* client IP if any */
    char *cookie_header_val;        /* the cookie header value if any */
    void *reserved;                 /* reserved - do not set this */
} am_web_request_params_t;

Members

am_web_request_params_t has the following components:

url

Pointer to the URL of the resource.

query

The query string appended to the request URL, if any. For example, if the URL is http://www.example.com?a=b&c=d, the value of this parameter would be a=b&c=d.

method

One of the following values of the am_web_req_method_t enumeration as defined:

#include "am_web.h"
typedef enum {
    AM_WEB_REQUEST_UNKNOWN,
    AM_WEB_REQUEST_GET,
    AM_WEB_REQUEST_POST,
    AM_WEB_REQUEST_HEAD,
    AM_WEB_REQUEST_PUT,
    AM_WEB_REQUEST_DELETE,
    AM_WEB_REQUEST_TRACE,
    AM_WEB_REQUEST_OPTIONS
} am_web_req_method_t;

More information on these request methods can be found in http://www.faqs.org/rfcs/rfc2068.html.

path_info

The path information in the request URL, if any.

client_ip

Pointer to the IP address from which the request was sent.

cookie_header_val

Pointer to the cookie header.

reserved

Do not set this.

am_web_set_header_in_request_t

Defines a data type for the am_web_render_result_func_t function pointer.

Details

See also am_web_render_result_func_t.

Syntax

#include "am_web.h"
typedef struct {
    am_web_set_header_in_request_func_t func;
    void **args;
} am_web_set_header_in_request_t;

Members

am_web_set_header_in_request_t has the following components:

func

Pointer to am_web_set_header_in_request_func_t function.

args

Pointer to a pointer to agent defined parameters.

am_web_set_method_t

Defines a data type for the am_web_set_method_func_t function pointer.

Details

See also am_web_set_method_func_t.

Syntax

#include "am_web.h"
typedef struct {
    am_web_set_method_func_t func;
    void **args;
} am_web_set_method_t;

Members

am_web_set_method_t has the following components:

func

Pointer to the am_web_set_method_func_t function.

args

Pointer to a pointer to agent defined parameters.

am_web_set_user_t

Defines a data type for the am_web_set_user_func_t function pointer.

Details

See also am_web_set_user_func_t.

Syntax

#include "am_web.h"
typedef struct {
    am_web_set_user_func_t func;
    void **args;
} am_web_set_user_t;

Members

am_web_set_user_t has the following components:

func

Pointer to am_web_set_user_func_t function.

args

Pointer to a pointer to agent defined parameters.

post_urls_t

A session information object defining the URLs used by the web agent to communicate with Access Manager.

Syntax

#include "am_web.h"
typedef struct post_urls {
    char *dummy_url;
    char *action_url;
    char *post_time_key;
} post_urls_t;

Members

post_urls_t has the following components:

dummy_url

Pointer to a dummy URL to redirect for POST data preservation.


Note –

POST data preservation is supported only on Policy Agent 2.2 for Sun Java System Web Server 6.1. The feature allows for submitted POST data to be preserved. See Preserving POST Data on Sun Java System Web Server 6.1 Only in Sun Java System Access Manager Policy Agent 2.2 Guide for Sun Java System Web Server 6.1 for more information.


action_url

Pointer to destination URL for a POST request.

post_time_key

Pointer to a unique key used to tag a POST data entry.