Auth.class.php (714B)
1 <?php 2 3 4 namespace cms\auth; 5 6 /** 7 * Interface for Authentication 8 */ 9 interface Auth 10 { 11 const STATUS_SUCCESS = 1; 12 const STATUS_FAILED = 2; 13 const STATUS_PW_EXPIRED = 4; 14 const STATUS_TOKEN_NEEDED = 8; 15 const STATUS_ACCOUNT_LOCKED = 16; 16 17 const NS = __NAMESPACE__; 18 19 /** 20 * Checks the provided login data. 21 * 22 * @param string $username username 23 * @param string $password password 24 * @param string $token token 25 * @return int a bitmask with Auth::STATUS_* 26 */ 27 function login($username, $password, $token); 28 29 30 /** 31 * Ermittelt den Benutzernamen. 32 * Der Benutzername wird verwendet, um die Loginmaske vorauszufüllen. 33 * @return string the username or null 34 */ 35 function username(); 36 }