![]() Communications Software |
||||
| Plexcel for PHP - Active Directory PHP Integration | ||||
| plexcel_new plexcel_status plexcel_find_authorities_by_domain plexcel_get_authority plexcel_get_domain plexcel_log plexcel_preamble plexcel_authenticate plexcel_sso plexcel_logon plexcel_logoff plexcel_accept_token plexcel_is_member_of plexcel_set_password plexcel_change_password plexcel_gen_service_keytab plexcel_search_objects plexcel_get_account plexcel_add_object plexcel_modify_object plexcel_delete_object plexcel_set_attrdefs plexcel_get_attrdefs plexcel_set_conv_attrdefs |
Synopsissession_start();
require_once('plexcel.php');
bool plexcel_sso(resource $px, array $options=NULL)
DescriptionThe plexcel_sso function authenticates a web client using Kerberos Single Sign-On (SSO). Note: It is recommended that general purpose web applications use the plexcel_preamble or possibly the plexcel_authenticate function instead. They provide higher-level, more feature-full interfaces. Note: This function is defined in plexcel.php which requires that sessions be initialized. Therefore, this function must be preceded by a call to session_start() and require_once('plexcel.php') . The plexcel_sso function calls dieInitially, a client will not supply the required Authorization header token. In this case, this function will set a response header, set the status to 401 Unauthorized and call die . If the client supports SSO, it should then re-submit it's request with the required token and be authenticated. This means that this function will be called twice for each request . For performance reasons, it is strongly recommended that this function be invoked before any code that is not absolutely necessary. The $px parameter is the Plexcel context resource being authenticated. The optional $options parameter it is an array of options used by the higher-level plexcel_authenticate and plexcel_preamble functions to set a JavaScript redirect for clients that do not support SSO. ReturnsThe plexcel_sso function returns TRUE if the client was successfully authenticated. Otherwise, FALSE is returned in which case plexcel_status should be consulted. ExampleThe following PHP script illustrates how to authenticate a client using the plexcel_sso function. <?php
session_start();
require_once('../plexcel.php');
$px = plexcel_new(NULL, NULL);
if (plexcel_sso($px) == FALSE)
die('<pre>' . plexcel_status($px) . '</pre>');
echo 'You have been successfully authenticated.';
?>
A simple plexcel_sso example
See alsoplexcel_preamble | plexcel_authenticate |
|||
|
© 2008 IOPLEX Software |
Contact Us |
Policies
|