check($specific = null)
Checks either all loaded Login drivers or just those specified as the parameter.
Static | Yes | ||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Returns | bool, whether one of the (given) drivers successfully validated the login | ||||||
Example |
|
The Auth package provides a standardized interface for authentication in Fuel. This allows our users to write their own drivers and easily integrate a new driver to work with old code by keeping the basic methods consistent.
The Auth class works mainly with one or more login drivers and offers a set of 2 methods for all other drivers. One getting a driver instance and a second answering whether a loaded driver of that type validates. Below are first the methods for checking and getting the drivers.
Checks either all loaded Login drivers or just those specified as the parameter.
Static | Yes | ||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Returns | bool, whether one of the (given) drivers successfully validated the login | ||||||
Example |
|
Retrieves a loaded driver, when drivers are set in config the first driver will also be the default.
Static | Yes | ||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Returns | Auth_Login_Driver | ||||||
Example |
|
The methods below should be available on all Auth drivers in at least the way described here, but will often have specific parameters added for their implementation.
Returns an array describing the current logged in user, always includes at least a screenname and an emailaddress. Additional fields can be configured in the driver config or requested through the $additional_fields array, but they must have a get_user_fieldname() method within the driver to be gettable.
Static | No | ||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Returns | array | ||||||
Example |
|
Must be implemented specific to the driver to login the user.
Static | No |
---|---|
Parameters | None by default |
Returns | bool |
Example |
|
Must be implemented specific to the driver to logout the user, and work without parameters.
Static | No |
---|---|
Parameters | None |
Returns | void |
Example |
|
Fetches the current logged in user's emailaddress.
Static | No |
---|---|
Parameters | None |
Returns | string |
Example |
|
Fetches the current logged in user's screen name.
Static | No |
---|---|
Parameters | None |
Returns | string |
Example |
|
(to be written)
(to be written)