Property | Type | Description | |
---|---|---|---|
$database | Kimai_Database_Mysql | ||
$kga | Kimai_Config |
Method | Description | |
---|---|---|
__construct ( Kimai_Database_Mysql $database = null, Kimai_Config $kga = null ) | ||
authenticate ( string $username, string $plainPassword, integer &$userId ) : boolean | Authenticate a combination of username and password. Both is given as the user wrote it into the input fields. | |
autoLoginPossible ( ) : boolean | Decides whether this authentication method should be used to authenticate users before they have provided any credentials. | |
getDefaultGlobalRole ( ) : integer | Return an ID of a global role to which users should be added, if they authenticated but are not known to Kimai. | |
getDefaultGroups ( ) : array | Return a map from group IDs to membership role IDs to which users should be added, if they authenticated but are not known to Kimai. | |
performAutoLogin ( integer &$userId ) : boolean | Try to authenticate the user before he sees the login page. | |
setDatabase ( Kimai_Database_Mysql $database ) | ||
setKga ( Kimai_Config $kga ) |
Method | Description | |
---|---|---|
getDatabase ( ) : Kimai_Database_Mysql | ||
getKga ( ) : Kimai_Config | ||
setConfig ( $key, $value ) | Set one config value. |
public __construct ( Kimai_Database_Mysql $database = null, Kimai_Config $kga = null ) | ||
$database | Kimai_Database_Mysql | |
$kga | Kimai_Config |
abstract public authenticate ( string $username, string $plainPassword, integer &$userId ) : boolean | ||
$username | string | name of the user who wants to authenticate |
$plainPassword | string | password in plaintext the user has provided |
$userId | integer | user id. If none exists it will be false |
return | boolean | either true if the credentials were correct, or false otherwise |
public autoLoginPossible ( ) : boolean | ||
return | boolean | true if this authentication method can login users without credentials, false otherwise |
protected getDatabase ( ) : Kimai_Database_Mysql | ||
return | Kimai_Database_Mysql |
public getDefaultGlobalRole ( ) : integer | ||
return | integer | global role ID |
public getDefaultGroups ( ) : array | ||
return | array | id of the group to add the user to |
public performAutoLogin ( integer &$userId ) : boolean | ||
$userId | integer | user id. If none exists it will be false |
return | boolean | either true if the user could be authenticated or false otherwise |
protected setConfig ( $key, $value ) | ||
$key | ||
$value |
public setDatabase ( Kimai_Database_Mysql $database ) | ||
$database | Kimai_Database_Mysql |
protected Kimai_Database_Mysql $database | ||
return | Kimai_Database_Mysql |