Sun Java System Access Manager 7 2005Q4 C API Reference

am_web_is_access_allowed()

Evaluates the access control policies for a specified web-resource and action.

Syntax

#include "am_web.h"
AM_WEB_EXPORT am_status_t am_web_is_access_allowed(const char *sso_token,
                                                   const char *url, const char *path_info,
                                                   const char *action_name,
                                                   const char *client_ip,
                                                   const am_map_t env_parameter_map,
                                                   am_policy_result_t *result);

Parameters

This function takes the following parameters:

sso_token

The sso_token from the Access Manager cookie. This parameter may be NULL if there is no cookie present.

url

The URL whose accessibility is being determined. This parameter may not be NULL.

action_name

The action (GET, POST, etc.) being performed on the specified URL. This parameter may not be NULL.

client_ip

The IP address of the client attempting to access the specified URL. If client IP validation is turned on, then this parameter may not be NULL.

env_parameter_map

A map containing additional information about the user attempting to access the specified URL. This parameter ay not be NULL.

advices_map_ptr

An output parameter where an am_map_t can be stored if the policy evaluation produces any advice information. This parameter may not be NULL.

Returns

This function returns am_status_t with one of the following values:

AM_SUCCESS

If the evaluation was performed successfully and access is to be allowed to the specified resource.

AM_NO_MEMORY

If the evaluation was not successfully completed due to insufficient memory being available.

AM_INVALID_ARGUMENT

If any of the URL, action_name, env_parameter_map, or advices_map_ptr parameters is NULL or if client IP validation is enabled and the client_ip parameter is NULL.

AM_INVALID_SESSION

If the specified sso_token does not refer to a currently valid session

AM_ACCESS_DENIED

If the policy information indicates that the user does not have permission to access the specified resource or any error is detected other than the ones listed above.