Sun Java System Access Manager 7 2005Q4 C API Reference

am_web_get_redirect_url()

Returns a string representing the Access Manager URL that web agent should redirect to. For example, if the status is AM_INVALID_SESSION and CDSSO is not enabled, the redirect URL would be the Access Manager login URL as configured in the AMAgent.properties file and associated query parameters.

Syntax

#include "am_web.h"
AM_WEB_EXPORT am_status_t
am_web_get_redirect_url(am_status_t status,
                            const am_map_t advice_map,
                            const char *goto_url,
                          const char* function,
                            char ** redirect_url);

Parameters

This function takes the following parameters:

status

The status from am_web_is_access_allowed.

advice_map

Any advice map from policy evaluation results.

goto_url

Original URL accessed by the user, for IS to redirect user to after successful authentication with the Access Manager.

redirect_url

A pointer to contain the resulting Access Manager redirect URL.

Returns

This function returns am_status_t with one of the following values:

AM_SUCCESS

If the call was successful.

AM_*

If any error occurs, the type of error indicated by the status value.

Details

The string may either redirect the user to the login URL or the access denied URL. If the redirection is to the login URL then the URL will include any existing information specified in the URL from the configuration file, like org value etc., followed by the specified goto parameter value, which will be used by Access Manager after the user has successfully authenticated.

If the redirect_url returned is NOT NULL, the caller of this function must call am_web_free_memory(void *) to free the pointer.