Returns a string representing a login URL or access denied URL to which the web agent should redirect.
am_web_get_redirect_url() has been deprecated and must not be used. It is supported for backward compatibility only.
am_web_get_url_to_redirect() may redirect the user to the login URL or the access denied URL. The URL is appropriate to the provided status code and advice map returned by the Policy SDK. If redirecting to the login URL, the URL will include existing information specified in the URL from the configuration file (for example, the organization name) as well as the specified goto parameter value which will be used by OpenSSO Enterprise after the user has successfully authenticated. The last parameter reserved must be passed with NULL.
If the URL returned is not NULL, the caller of this function must call am_web_free_memory(void *) to free the pointer.
#include "am_web.h" AM_WEB_EXPORT am_status_t am_web_get_url_to_redirect(am_status_t status, const am_map_t advice_map, const char *goto_url, const char* method, void *reserved, char ** redirect_url, void* agent_config);
This function takes the following parameters:
The status from am_web_is_access_allowed().
See am_web_is_access_allowed().
Any advice map from policy evaluation results.
Pointer to the original URL which the user attempted to access.
Pointer to the original HTTP method: GET or POST.
This parameter is not currently used.
Pointer to a pointer containing the resulting OpenSSO Enterprise redirect URL.
An agent configuration instance returned by am_web_get_agent_configuration(). This parameter should not be NULL.
This function returns one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):
If successful.
Otherwise.