ATK /security/class.atksecuritylistener.inc

Language PHP Lines 51
MD5 Hash 0a1252b7b7c251f2db984702c9239d6c
Repository https://github.com/ibuildingsnl/ATK.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php

  /**
   * This file is part of the Achievo ATK distribution.
   * Detailed copyright and licensing information can be found
   * in the doc/COPYRIGHT and doc/LICENSE files which should be
   * included in the distribution.
   *
   * @package atk
   * @subpackage security
   *
   * @copyright (c)2007 Ibuildings.nl BV
   * @license http://www.achievo.org/atk/licensing ATK Open Source License
   *
   * @version $Revision: 5798 $
   * $Id$
   */

  /**
   * ATK security listener.
   *
   * An instance of the ATK security listener can be registered as listener for the
   * ATK security manager. It will then be notified of successful logins and logouts.
   *
   * The following events are supported:
   *
   * preLogin:   This event is thrown just before the user get's authenticated.
   * postLogin:  This event is thrown just after the user is successfully authenticated.
   * preLogout:  This event is thrown just before the user get's logged out the system.
   * postLogout: This event is thrown just after the user is logged out the system.
   *
   * @author Peter C. Verhage <peter@ibuildings.nl>
   * @package atk
   * @subpackage security
   */
  class atkSecurityListener
  {
    /**
     * Handle event. In the default implementation, if a method exists with the same
     * name as the event this method will be called.
     *
     * @param string $event    event name
     * @param string $username user name
     */
    function handleEvent($event, $username)
    {
      if (method_exists($this, $event))
        $this->$event($username);
    }
  }
?>
Back to Top