Auth

package Fuel
subpackage Auth

 Methods

Magic method used to retrieve driver instances and check them for validity

__callStatic($method, $args) : mixed

Parameters

$method

string

$args

array

Exceptions

\Auth\BadMethodCallException

Returns

mixed

Check driver

_driver_check(string $type, mixed $condition, string $driver, Array $entity) : bool

Parameters

$type

string

driver type

$condition

mixed

condition for which the driver is checked

$driver

string

driver id or null to check all

$entity

Array

identifier to check, should default to current user or relation therof and be in the form of array(driver_id, user_id)

Returns

bool

_init()

_init() 

Register verified Login driver

_register_verified(\Auth\Auth_Login_Driver $driver) 

Parameters

$driver

Auth_Login_Driver

Unregister verified Login driver

_unregister_verified(\Auth\Auth_Login_Driver $driver) 

Parameters

$driver

Auth_Login_Driver

Check login drivers for validated login

check(string | Array $specific) : bool

Parameters

$specific

stringArray

specific driver or drivers, in this case it will always terminate after first success

Returns

bool

Load a login driver to the array of loaded drivers

forge(Array $custom) 

Parameters

$custom

Array

settings for the new driver

Exceptions

\Auth\AuthException on driver load failure

Return a specific driver, or the default instance (is created if necessary)

instance(string $instance) : \Auth\Auth_Login_Driver

Parameters

$instance

string

driver id

Returns

Logs out all current logged in drivers

logout() 

Register a new driver type

register_driver_type(string $type, string $check_method) : bool

Parameters

$type

string

name of the driver type, may not conflict with class method name

$check_method

string

name of the method to use for checking this type of driver, also cannot conflict with method

Returns

bool

Remove individual driver, or all drivers of $type

unload(string $driver_id) 

Parameters

$driver_id

string

driver id or null for default driver

Exceptions

\Auth\AuthException when $driver_id isn't valid or true

Unregister a driver type

unregister_driver_type(string $type) : bool

Parameters

$type

string

name of the driver type

Returns

bool

Get verified driver or all verified drivers returns false when specific driver has not validated when all were requested and none validated an empty array is returned

verified(null | string $driver) : Array | \Auth\Auth_Login_Driver | false

Parameters

$driver

nullstring

driver id or null for all verified driver in an array

Returns

Retrieve a loaded driver instance (loading must be done by other driver class)

_driver_instance(string $type, string | true $instance) : \Auth\Auth_Driver | array

Parameters

$type

string

driver type

$instance

stringtrue

driver id or true for an array of all loaded drivers

Returns

Prevent instantiation

__construct() 

 Properties

 

<p>subdriver registry, takes driver name and method for checking it</p>

$_drivers : Array

 

<p>default instance</p>

$_instance : \Auth\Auth_Login_Driver

 

<p>contains references if multiple were loaded</p>

$_instances : Array

 

<p>Login drivers that verified a current login</p>

$_verified : Array

 

<p>Whether to verify multiple</p>

$_verify_multiple : bool