Back to Joomla project (class list)

Class Authentication - list of methods

Authentication class, provides an interface for the Joomla authentication system
Package: Joomla\CMS\Authentication
Copyright: (C) 2005 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Authentication/Authentication.php
Project: Joomla

Method Summary

public
(string $pluginType = 'authentication', \Joomla\Event\DispatcherInterface $dispatcher = null)

Constructor
Parameters
  • string $pluginType The plugin type to run authorisation and authentication on
  • \Joomla\Event\DispatcherInterface $dispatcher The event dispatcher we're going to use
Since
  • 1.7.0
Show source code of this method: __construct Source Code

public static \Joomla\CMS\Authentication\Authentication
(string $pluginType = 'authentication')

Returns the global authentication object, only creating it if it doesn't already exist.
Parameters
  • string $pluginType The plugin type to run authorisation and authentication on
Returns
  • \Joomla\CMS\Authentication\Authentication The global Authentication object
Since
  • 1.7.0
Show source code of this method: getInstance Source Code

public \Joomla\CMS\Authentication\AuthenticationResponse
(mixed $credentials, mixed $options = array())

Finds out if a set of login credentials are valid by asking all observing objects to run their respective authentication routines.
Parameters
  • array $credentials Array holding the user credentials.
  • array $options Array holding user options.
Returns
  • \Joomla\CMS\Authentication\AuthenticationResponse Response object with status variable filled in for last plugin or first successful plugin.
Since
  • 1.7.0
-
  • \Joomla\CMS\Authentication\AuthenticationResponse
Show source code of this method: authenticate Source Code

public \Joomla\CMS\Authentication\AuthenticationResponse[]
(mixed $response, mixed $options = array())

Authorises that a particular user should be able to login
Parameters
  • \Joomla\CMS\Authentication\AuthenticationResponse $response response including username of the user to authorise
  • array $options list of options
Returns
  • \Joomla\CMS\Authentication\AuthenticationResponse[] Array of authentication response objects
Since
  • 1.7.0
-
  • \Exception
Show source code of this method: authorise Source Code

Properties Summary

protected static \Joomla\CMS\Authentication\Authentication[]
$instance
Since
  • 1.7.3
protected string
$pluginType
Plugin Type to run
Since
  • 4.0.0

Constants Summary

public int
$STATUS_SUCCESS
This is the status code returned when the authentication is success (permit login)
Since
  • 1.7.0
public int
$STATUS_CANCEL
Status to indicate cancellation of authentication (unused)
Since
  • 1.7.0
public int
$STATUS_FAILURE
This is the status code returned when the authentication failed (prevent login if no success)
Since
  • 1.7.0
public int
$STATUS_EXPIRED
This is the status code returned when the account has expired (prevent login)
Since
  • 1.7.0
public int
$STATUS_DENIED
This is the status code returned when the account has been denied (prevent login)
Since
  • 1.7.0
public int
$STATUS_UNKNOWN
This is the status code returned when the account doesn't exist (not an error)
Since
  • 1.7.0

Tags Summary

Since
1.7.0