Sun Java System Access Manager 7 2005Q4 C API Reference


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 file and associated query parameters.


#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);


This function takes the following parameters:


The status from am_web_is_access_allowed.


Any advice map from policy evaluation results.


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


A pointer to contain the resulting Access Manager redirect URL.


This function returns am_status_t with one of the following values:


If the call was successful.


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


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.