This class contains functions for global authentication in CONTENIDO.
package |
Core |
subpackage |
Authentication |
Methods
Magic getter function for outdated variable names.
__get(string $name) : mixed
Parameters
$name
string
name of the variable
Returns
mixed
auth_loglogin()
auth_loglogin()
auth_preauth()
auth_preauth()
auth_validatelogin()
auth_validatelogin()
Getter for the auth information.
getAuthInfo() : array
Returns
array
auth information
Checks, if user is authenticated (NOT logged in!).
isAuthenticated() : bool
is_authenticated()
is_authenticated()
Logs out the current user, resets the auth information and freezes the
session.
logout(bool $nobody) : bool
Parameters
$nobody
bool
If flag set to true, nobody is recreated as user.
Returns
bool
true
Resets the global authentication information.
resetAuthInfo(bool $nobody) : void
Parameters
$nobody
bool
If flag set to true, the default authentication is
switched to nobody. (optional, default: false)
Restarts the authentication process.
restart() : void
Starts the authentication process.
start() : void
Sets the authentication info for a user.
_setAuthInfo(string $userId) : void
Parameters
$userId
string
user ID to set
Sets or refreshs the expiration of the authentication.
_setExpiration(int $expiration) : void
Parameters
$expiration
int
new expiration (optional, default: null = current
time plus lifetime minutes)
Starts the login process by pre authorizing.
_startLoginProcess() : void
Properties
$_lifetime : integer
After that time the authentication expires.
$_in : bool
Nobody knows, for which reasons it exists.
Constants
AUTH_UID_NOBODY
AUTH_UID_NOBODY