Class JAuthentication

Description

Authentication class, provides an interface for the Joomla authentication system

  • since: 11.1

Located in /libraries/joomla/user/authentication.php (line 19)

JObject
   |
   --JAuthentication
Class Constant Summary
Variable Summary
Method Summary
 static array[JAuthenticationResponse] authorise (JAuthenticationResponse $response, [array $options = array()])
 void attach (object $observer)
 JAuthenticationResponse authenticate (array $credentials, [array $options = array()])
 boolean detach (object $observer)
 mixed getState ()
 JAuthentication __construct ()
Variables
static JAuthentication $instance (line 94)
  • var: JAuthentication instances container.
  • since: 11.3
  • access: protected
array $methods = array() (line 88)

A multi dimensional array of [function][] = key for observers

  • since: 12.1
  • access: protected
array $observers = array() (line 72)

An array of Observer objects to notify

  • since: 12.1
  • access: protected
mixed $state = null (line 80)

The state of the observable object

  • since: 12.1
  • access: protected

Inherited Variables

Inherited from JObject

JObject::$_errors
Methods
static authorise (line 327)

Authorises that a particular user should be able to login

  • return: results of authorisation
  • since: 11.2
  • access: public
static array[JAuthenticationResponse] authorise (JAuthenticationResponse $response, [array $options = array()])
  • JAuthenticationResponse $response: response including username of the user to authorise
  • array $options: list of options
static getInstance (line 119)

Returns the global authentication object, only creating it if it doesn't already exist.

  • return: The global JAuthentication object
  • since: 11.1
  • access: public
static JAuthentication getInstance ()
attach (line 150)

Attach an observer object

  • since: 11.1
  • access: public
void attach (object $observer)
  • object $observer: An observer object to attach
authenticate (line 255)

Finds out if a set of login credentials are valid by asking all observing objects to run their respective authentication routines.

  • return: Response object with status variable filled in for last plugin or first successful plugin.
  • see: JAuthenticationResponse
  • since: 11.1
  • access: public
JAuthenticationResponse authenticate (array $credentials, [array $options = array()])
  • array $credentials: Array holding the user credentials.
  • array $options: Array holding user options.
detach (line 218)

Detach an observer object

  • return: True if the observer object was detached.
  • since: 11.1
  • access: public
boolean detach (object $observer)
  • object $observer: An observer object to detach.
getState (line 136)

Get the state of the JAuthentication object

  • return: The state of the object.
  • since: 11.1
  • access: public
mixed getState ()
Constructor __construct (line 101)

Constructor

  • since: 11.1
  • access: public
JAuthentication __construct ()

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.

Inherited Methods

Inherited From JObject

 JObject::__construct()
 JObject::def()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::__toString()
Class Constants
STATUS_CANCEL = 2 (line 35)

Status to indicate cancellation of authentication (unused)

  • since: 11.2
STATUS_DENIED = 16 (line 57)

This is the status code returned when the account has been denied (prevent login)

  • since: 11.2
STATUS_EXPIRED = 8 (line 50)

This is the status code returned when the account has expired (prevent login)

  • since: 11.2
STATUS_FAILURE = 4 (line 42)

This is the status code returned when the authentication failed (prevent login if no success)

  • since: 11.2
STATUS_SUCCESS = 1 (line 27)

This is the status code returned when the authentication is success (permit login)

  • since: 11.2
STATUS_UNKNOWN = 32 (line 64)

This is the status code returned when the account doesn't exist (not an error)

  • since: 11.2

Documentation generated on Tue, 19 Nov 2013 14:54:10 +0100 by phpDocumentor 1.4.3