Authentication
Joomla Framework Authentication Class
| since |
1.0 |
|---|---|
| package |
Joomla Framework |
Methods
addStrategy
Register a new strategy
addStrategy( strategyName, \Joomla\Authentication\AuthenticationStrategyInterface strategy) :
| since |
1.0 |
|---|
Arguments
- strategyName
stringThe name to use for the strategy.- strategy
AuthenticationStrategyInterfaceThe authentication strategy object to add.
Response
void
authenticate
Perform authentication
authenticate(string||string|int strategies = []) : string|bool
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- strategies
array<string|int, string>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||string|int
Use this if you want to get more detailed information about the results of an authentication attempts.
| since |
1.0 |
|---|
Response
array<string|int, 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.
results
The array of results.
| since |
1.0 |
|---|
Type(s)
array<string|int, int>