This class contains the methods for the backend authentication in CONTENIDO.

package Core
subpackage Authentication

 Methods

Constructor of the backend auth handler.

__construct() : void

Automatically sets the lifetime of the authentication to the configured value.

Magic getter function for outdated variable names.

__get(string $name) : mixed
Inherited
inherited_from \cAuth::__get()
inherited_from \cAuthHandlerAbstract::__get()

Parameters

$name

string

name of the variable

Returns

mixed

auth_loginform()

auth_loginform() 
Inherited
inherited_from \cAuth::auth_loginform()
inherited_from \cAuthHandlerAbstract::auth_loginform()

auth_loglogin()

auth_loglogin() 
Inherited
inherited_from \cAuth::auth_loglogin()
inherited_from \cAuthHandlerAbstract::auth_loglogin()

auth_preauth()

auth_preauth() 
Inherited
inherited_from \cAuth::auth_preauth()
inherited_from \cAuthHandlerAbstract::auth_preauth()

auth_validatelogin()

auth_validatelogin() 
Inherited
inherited_from \cAuth::auth_validatelogin()
inherited_from \cAuthHandlerAbstract::auth_validatelogin()

Display the login form.

displayLoginForm() : void

Let this method include a file which displays the login form.

Getter for the auth information.

getAuthInfo() : array
Inherited
inherited_from \cAuth::getAuthInfo()
inherited_from \cAuthHandlerAbstract::getAuthInfo()

Returns

arrayauth information

Checks, if user is authenticated (NOT logged in!).

isAuthenticated() : bool
Inherited
inherited_from \cAuth::isAuthenticated()
inherited_from \cAuthHandlerAbstract::isAuthenticated()

Returns

bool

Checks, if user is currently in login form mode.

isLoginForm() : bool
Inherited
inherited_from \cAuth::isLoginForm()
inherited_from \cAuthHandlerAbstract::isLoginForm()

Returns

bool

is_auth_form_uid()

is_auth_form_uid() 
Inherited
inherited_from \cAuth::is_auth_form_uid()
inherited_from \cAuthHandlerAbstract::is_auth_form_uid()

is_authenticated()

is_authenticated() 
Inherited
inherited_from \cAuth::is_authenticated()
inherited_from \cAuthHandlerAbstract::is_authenticated()

Log the successful authentication.

logSuccessfulAuth() : void

If wished, this method can be executed for logging an successful authentication.

Logs out the current user, resets the auth information and freezes the session.

logout(bool $nobody) : bool
Inherited
inherited_from \cAuth::logout()
inherited_from \cAuthHandlerAbstract::logout()

Parameters

$nobody

bool

If flag set to true, nobody is recreated as user.

Returns

booltrue

Handle the pre authorization.

preAuthorize() : string

Let return this method a valid user ID to set before the login form is handled, otherwise false.

Returns

stringfalse

purl()

purl() 
Inherited
inherited_from \cAuth::purl()
inherited_from \cAuthHandlerAbstract::purl()

Resets the global authentication information.

resetAuthInfo(bool $nobody) : void
Inherited
inherited_from \cAuth::resetAuthInfo()
inherited_from \cAuthHandlerAbstract::resetAuthInfo()

Parameters

$nobody

bool

If flag set to true, the default authentication is switched to nobody. (optional, default: false)

Restarts the authentication process.

restart() : void
Inherited
inherited_from \cAuth::restart()
inherited_from \cAuthHandlerAbstract::restart()

Starts the authentication process.

start() : void
Inherited
inherited_from \cAuth::start()
inherited_from \cAuthHandlerAbstract::start()

unauth()

unauth($nobody) 
Inherited
inherited_from \cAuth::unauth()
inherited_from \cAuthHandlerAbstract::unauth()

Parameters

$nobody

url()

url() 
Inherited
inherited_from \cAuth::url()
inherited_from \cAuthHandlerAbstract::url()

Validate the credentials.

validateCredentials() : string

Let this method validate the users input against source and return a valid user ID or false.

Returns

stringfalse

Fetches the login form.

_fetchLoginForm() : void
Inherited
inherited_from \cAuth::_fetchLoginForm()
inherited_from \cAuthHandlerAbstract::_fetchLoginForm()

Sets the authentication info for a user.

_setAuthInfo(string $userId) : void
Inherited
inherited_from \cAuth::_setAuthInfo()
inherited_from \cAuthHandlerAbstract::_setAuthInfo()

Parameters

$userId

string

user ID to set

Sets or refreshs the expiration of the authentication.

_setExpiration(int $expiration) : void
Inherited
inherited_from \cAuth::_setExpiration()
inherited_from \cAuthHandlerAbstract::_setExpiration()

Parameters

$expiration

int

new expiration (optional, default: null = current time plus lifetime minutes)

Starts the login process by pre authorizing.

_startLoginProcess() : void
Inherited
inherited_from \cAuth::_startLoginProcess()
inherited_from \cAuthHandlerAbstract::_startLoginProcess()

 Properties

 

$auth : array
Inherited
inherited_from \cAuth::$$auth
inherited_from \cAuthHandlerAbstract::$$auth
 

$_defaultNobody : bool
Inherited
inherited_from \cAuth::$$_defaultNobody
inherited_from \cAuthHandlerAbstract::$$_defaultNobody
 

$_lifetime : integer
Inherited

After that time the authentication expires.

inherited_from \cAuth::$$_lifetime
inherited_from \cAuthHandlerAbstract::$$_lifetime
 

$_in : bool
Inherited

Nobody knows, for which reasons it exists.

inherited_from \cAuth::$$_in
inherited_from \cAuthHandlerAbstract::$$_in

 Constants

 

AUTH_UID_FORM

AUTH_UID_FORM 
Inherited
inherited_from \cAuth::AUTH_UID_FORM
inherited_from \cAuthHandlerAbstract::AUTH_UID_FORM
 

AUTH_UID_NOBODY

AUTH_UID_NOBODY 
Inherited
inherited_from \cAuth::AUTH_UID_NOBODY
inherited_from \cAuthHandlerAbstract::AUTH_UID_NOBODY