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

am_web_set_method_func_t

Sets the request method to be used by a web agent during cross domain single sign-on (CDSSO).

Details

In cases of CDSSO actions between OpenSSO Enterprise and web agents, the POST request method is used by the web agent. am_web_set_method_func_t is required to change the request method to POST, if necessary, from the method defined in the original HTTP request. See Cross-Domain Single Sign-On Session in Sun OpenSSO Enterprise 8.0 Technical Overview for additional information.

Syntax

#include "am_web.h"
typedef am_status_t (*am_web_set_method_func_t)(
                                void **args, 
                                am_web_req_method_t method);

Parameters

This function takes the following parameter:

args

Pointer to a pointer to agent defined parameters.

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.

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 method was successfully set.

HTTP forbidden result

Otherwise.