Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SIWECOS
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cAuth
  • cAuthHandlerAbstract
  • cAuthHandlerBackend
  • cAuthHandlerFrontend
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cAuth

This class contains functions for global authentication in CONTENIDO.

Direct known subclasses

cAuthHandlerAbstract

Indirect known subclasses

cAuthHandlerBackend, cAuthHandlerFrontend
Package: Core\Authentication
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Dominik Ziegler
Located at classes/auth/class.auth.php
Methods summary
public mixed
# __get( string $name )

Magic getter function for outdated variable names.

Magic getter function for outdated variable names.

Parameters

$name
string
$name name of the variable

Returns

mixed
public
# start( )

Starts the authentication process.

Starts the authentication process.

public
# restart( )

Restarts the authentication process.

Restarts the authentication process.

public
# resetAuthInfo( boolean $nobody = false )

Resets the global authentication information.

Resets the global authentication information.

Parameters

$nobody
boolean
$nobody [optional] If flag set to true, the default authentication is switched to nobody. (optional, default: false)
public boolean
# logout( boolean $nobody = false )

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

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

Parameters

$nobody
boolean
$nobody [optional] If flag set to true, nobody is recreated as user.

Returns

boolean
true
public array
# getAuthInfo( )

Getter for the auth information.

Getter for the auth information.

Returns

array
public boolean
# isAuthenticated( )

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

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

Returns

boolean
public boolean
# isLoginForm( )

Checks, if user is currently in login form mode.

Checks, if user is currently in login form mode.

Returns

boolean
public string
# getUserId( )

Returns the user id of the currently authenticated user

Returns the user id of the currently authenticated user

Returns

string
public string
# getUsername( )

Returns the user name of the currently authenticated user

Returns the user name of the currently authenticated user

Returns

string
public string
# getPerms( )

Returns the permission string of the currently authenticated user

Returns the permission string of the currently authenticated user

Returns

string
protected
# _setExpiration( integer $expiration = NULL )

Sets or refreshs the expiration of the authentication.

Sets or refreshs the expiration of the authentication.

Parameters

$expiration
integer
$expiration [optional] new expiration (optional, default: NULL = current time plus lifetime minutes)
protected
# _fetchLoginForm( )

Fetches the login form.

Fetches the login form.

protected
# _setAuthInfo( string $userId, integer $expiration = NULL )

Sets the authentication info for a user.

Sets the authentication info for a user.

Parameters

$userId
string
$userId user ID to set
$expiration
integer
$expiration [optional] expiration (optional, default: NULL)
Constants summary
string AUTH_UID_NOBODY 'nobody'
#

Authentification user ID for nobody.

Authentification user ID for nobody.

string AUTH_UID_FORM 'form'
#

Authentification user ID for calling login form.

Authentification user ID for calling login form.

Properties summary
public array $auth array()
#

The global auth information array.

The global auth information array.

This array has these keys:

  • uid = user_id for backend users and idfrontenduser for frontendusers
  • uname = username as part of the credentials to login
  • perm = user and group permissions as CSV
  • exp = expiration date as Unix timestamp
protected integer $_lifetime 15
#

Lifetime for authenticated users in minutes. After that time the authentication expires.

Lifetime for authenticated users in minutes. After that time the authentication expires.

protected boolean $_defaultNobody false
#

Automatic authentication as nobody.

Automatic authentication as nobody.

private boolean $_in false
#

The "in flag". Nobody knows, for which reason it exists.

The "in flag". Nobody knows, for which reason it exists.

public array $persistent_slots ['auth']
#

Property used for session persistency, by cSession. This property needs to be public since cSession has to set it!

Property used for session persistency, by cSession. This property needs to be public since cSession has to set it!

CMS CONTENIDO 4.10.1 API documentation generated by ApiGen 2.8.0