Ejemplo n.º 1
0
<?php

include 'aeon-funcs.php';
session_start();
// DEBUG
$debug = 0;
// debug off
//$debug = 1;  // debug on
// Set a session var showing that we're a non-shib user
$_SESSION['aeonControl_usertype'] = 'nonshib';
// Pull back the aeon params from persistent storage
$aeonParams = retrieveAeonParams();
// Clear the aeon params so they don't inadvertantly get reused
clearAeonParams();
// Submit the params via POST to the non-shib Aeon
$nonshib_dll = 'https://aeon.cul.columbia.edu/nonshib/aeon.dll';
buildAutoPostForm($nonshib_dll, $aeonParams, $debug);
Ejemplo n.º 2
0
// If we're coming back from the Aeon servers,
// - mark ourselves as authenticated
// - set a session variable saying we're authenticated
if (isset($_GET['authenticated']) && $_GET['authenticated'] == 'true') {
    $authenticated = 'true';
    $_SESSION['aeonControl_authenticated'] = 'true';
}
// If we're authenticated (either because we're processing a bounce-back
// from aeon or because the session variable says so), then we're ready to
// submit the External EAD Request (by way of an auto-submit html form).
// - fetch our params from storage
// - build the form
// - clear our stored params, to help avoid resubmitting
if ($authenticated == 'true') {
    $aeonParams = retrieveAeonParams();
    buildAutoPostForm($aeonParams);
    clearAeonParams();
    exit;
}
// If we have not yet authenticated, give the user the
// two-panel login choice screen - (Affiliated or not?).
// If affiliated, go to the shib-protected bounce-back URL on the aeon serve
// If not, post to the /nonshib area on the aeon server
if ($authenticated != 'true') {
    buildLoginForm($aeonParams);
    exit;
}
// We should never reach here.
echo "<html><body>ERROR</body></html>";
exit;
// ######################################## //