PHP Class Kimai_Auth_Http

Inheritance: extends Kimai_Auth_Abstract
Show file Open project: kimai/kimai

Protected Properties

Property Type Description
$HTAUTH_ALLOW_AUTOLOGIN Set true to allow web server authorized automatic logins
$HTAUTH_FORCE_USERNAME_LOWERCASE Set true to force username to lower case before searching Kimai database
$HTAUTH_PHP_AUTH_USER Check for PHP_AUTH_USER server variable
$HTAUTH_REDIRECT_REMOTE_USER Check for REDIRECT_REMOTE_USER server variable
$HTAUTH_REMOTE_USER Check for REMOTE_USER server variable
$HTAUTH_USER_AUTOCREATE Set true to create Kimai user for web server authorized users not in database

Public Methods

Method Description
authenticate ( string $username, string $password, integer &$userId ) : boolean
autoLoginPossible ( ) : boolean Decides whether this authentication method should be used to authenticate users before they have provided any credentials.
performAutoLogin ( integer &$userId ) : boolean Try to authenticate the user before he sees the login page.

Method Details

authenticate() public method

public authenticate ( string $username, string $password, integer &$userId ) : boolean
$username string
$password string
$userId integer
return boolean

autoLoginPossible() public method

This allows users to be logged in automatically. Mostly used with SSO (single sign on) solutions.
public autoLoginPossible ( ) : boolean
return boolean true if this authentication method can login users without credentials, false otherwise

performAutoLogin() public method

Try to authenticate the user before he sees the login page.
public performAutoLogin ( integer &$userId ) : boolean
$userId integer is set to the id of the user. If none exists it will be false
return boolean either true if the user could be authenticated or false otherwise

Property Details

$HTAUTH_ALLOW_AUTOLOGIN protected property

Set true to allow web server authorized automatic logins
protected $HTAUTH_ALLOW_AUTOLOGIN

$HTAUTH_FORCE_USERNAME_LOWERCASE protected property

Set true to force username to lower case before searching Kimai database
protected $HTAUTH_FORCE_USERNAME_LOWERCASE

$HTAUTH_PHP_AUTH_USER protected property

Check for PHP_AUTH_USER server variable
protected $HTAUTH_PHP_AUTH_USER

$HTAUTH_REDIRECT_REMOTE_USER protected property

Check for REDIRECT_REMOTE_USER server variable
protected $HTAUTH_REDIRECT_REMOTE_USER

$HTAUTH_REMOTE_USER protected property

Check for REMOTE_USER server variable
protected $HTAUTH_REMOTE_USER

$HTAUTH_USER_AUTOCREATE protected property

Set true to create Kimai user for web server authorized users not in database
protected $HTAUTH_USER_AUTOCREATE