\JAuthentication
Authentication class, provides an interface for the Joomla authentication system
Synopsis
class JAuthentication
extends JObject
{
- // constants
- const STATUS_SUCCESS = 1;
- const STATUS_CANCEL = 2;
- const STATUS_FAILURE = 4;
- const STATUS_EXPIRED = 8;
- const STATUS_DENIED = 16;
- const STATUS_UNKNOWN = 32;
- // members
- protected $observers;
- protected $state;
- protected $methods;
- protected JAuthentication $instance;
- // Inherited members from JObject
- protected $_errors;
- // methods
- public void __construct()
- public static JAuthentication getInstance()
- public mixed getState()
- public void attach()
- public boolean detach()
- public JAuthenticationResponse authenticate()
- public static array[JAuthenticationResponse] authorise()
- // Inherited methods from JObject
- public void __construct()
- public string __toString()
- public mixed def()
- public mixed get()
- public array getProperties()
- public string getError()
- public array getErrors()
- public mixed set()
- public boolean setProperties()
- public void setError()
Hierarchy
Extends
Constants
Name | Value |
---|---|
STATUS_SUCCESS | 1 |
STATUS_CANCEL | 2 |
STATUS_FAILURE | 4 |
STATUS_EXPIRED | 8 |
STATUS_DENIED | 16 |
STATUS_UNKNOWN | 32 |
Members
protected
- $_errors
—
array
An array of error messages or Exception objects. - $instance — JAuthentication
- $methods
—
array
A multi dimensional array of [function][] = key for observers - $observers
—
array
An array of Observer objects to notify - $state
—
mixed
The state of the observable object
Methods
public
- __construct() — Constructor
- attach() — Attach an observer object
- authenticate() — Finds out if a set of login credentials are valid by asking all observing objects to run their respective authentication routines.
- detach() — Detach an observer object
- getInstance() — Returns the global authentication object, only creating it if it doesn't already exist.
- getState() — Get the state of the JAuthentication object
Inherited from JObject
public
- __toString() — Magic method to convert the object to a string gracefully.
- def() — Sets a default value if not alreay assigned
- get() — Returns a property of the object or the default value if the property is not set.
- getError() — Get the most recent error message.
- getErrors() — Return all errors, if any.
- getProperties() — Returns an associative array of object properties.
- set() — Modifies a property of the object, creating it if it does not already exist.
- setError() — Add an error message.
- setProperties() — Set the object properties based on a named array/hash.