PHP Classes

File: example/auth_check.php

Recommend this page to a friend!
  Classes of Victor Bolshov   CrossAuth   example/auth_check.php   Download  
File: example/auth_check.php
Role: Example script
Content type: text/plain
Description: usage example
Class: CrossAuth
Authenticate users in multiple domains at once
Author: By
Last change:
Date: 17 years ago
Size: 398 bytes
 

Contents

Class file image Download
<?php

require_once dirname(__FILE__) . '/../CrossAuth.php';

/**
 * Fake approval function.
 *
 * @return bool alwayse TRUE
 */
function fake_approve() {
    return
true;
}

$ca = new CrossAuth();
$ca->setApproveCallback('fake_approve');
$ca->jsHeader();

if (
$approved = $ca->isApproved()) {
   
// do something for the authorized user
} else {
   
// do something for the DIRTY, BAD-SMELLING HACKER
}

?>