Authentication
Joomla Framework Authentication Class
| since |
1.0 |
|---|---|
| package |
Joomla Framework |
Methods
addStrategy
Register a new strategy
addStrategy(string strategyName, \Joomla\Authentication\AuthenticationStrategyInterface strategy) : void
| since |
1.0 |
|---|
Arguments
- strategyName
stringThe name to use for the strategy.- strategy
\Joomla\Authentication\AuthenticationStrategyInterfaceThe authentication strategy object to add.
authenticate
Perform authentication
authenticate(\Joomla\Authentication\AuthenticationStrategyInterface[] strategies = array()) : string|bool
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- strategies
\Joomla\Authentication\AuthenticationStrategyInterface[]Array of strategies to try - empty to try all strategies.
Response
string|boolA string containing a username if authentication is successful, false otherwise.
getResults
Get authentication results.
getResults() : int[]
Use this if you want to get more detailed information about the results of an authentication attempts.
| since |
1.0 |
|---|
Response
int[]An array containing authentication results.
Constants
SUCCESS
Authentication was successful.
| Value | 1 |
|---|---|
| since |
1.0 |
INVALID_CREDENTIALS
Credentials were provided but they were invalid.
| Value | 2 |
|---|---|
| since |
1.0 |
NO_SUCH_USER
Credentials were provided but the user did not exist in the credential store.
| Value | 3 |
|---|---|
| since |
1.0 |
NO_CREDENTIALS
There were no credentials found.
| Value | 4 |
|---|---|
| since |
1.0 |
INCOMPLETE_CREDENTIALS
There were partial credentials found but they were not complete.
| Value | 5 |
|---|---|
| since |
1.0 |
Properties
strategies
The array of strategies.
| since |
1.0 |
|---|
Type(s)
\Joomla\Authentication\AuthenticationStrategyInterface[]
results
The array of results.
| since |
1.0 |
|---|
Type(s)
int[]