DatabaseStrategy
Extends AbstractUsernamePasswordAuthenticationStrategyJoomla Framework Database Strategy Authentication class
| since |
1.1.0 |
|---|---|
| package |
Joomla Framework |
Methods
__construct
Strategy Constructor
__construct(\Joomla\Input\Input input, \Joomla\Database\DatabaseInterface database, mixed||string|int options = [], \Joomla\Authentication\Password\HandlerInterface passwordHandler = null) :
| since |
1.1.0 |
|---|
Arguments
- input
InputThe input object from which to retrieve the request credentials.- database
DatabaseInterfaceDatabaseDriver for retrieving user credentials.- options
array<string|int, mixed>Optional options array for configuring the credential storage connection.- passwordHandler
HandlerInterface|nullThe password handler.
Response
mixed
authenticate
Attempt to authenticate the username and password pair.
authenticate() : string|bool
| since |
1.1.0 |
|---|
Response
string|boolA string containing a username if authentication is successful, false otherwise.
doAuthenticate
Attempt to authenticate the username and password pair.
doAuthenticate( username, password) : string|bool
| since |
1.1.0 |
|---|
Arguments
- username
stringThe username to authenticate.- password
stringThe password to attempt authentication with.
Response
string|boolA string containing a username if authentication is successful, false otherwise.
getHashedPassword
Retrieve the hashed password for the specified user.
getHashedPassword( username) : string|bool
| since |
1.1.0 |
|---|
Arguments
- username
stringUsername to lookup.
Response
string|boolHashed password on success or boolean false on failure.
getResult
Get the status of the last authentication attempt.
getResult() :
| since |
1.1.0 |
|---|
Response
intAuthentication class constant result.
verifyPassword
Attempt to verify the username and password pair.
verifyPassword( username, password, hashedPassword) :
| since |
1.1.0 |
|---|
Arguments
- username
stringThe username to authenticate.- password
stringThe password to attempt authentication with.- hashedPassword
stringThe hashed password to attempt authentication against.
Response
bool
Properties
passwordHandler
The password handler to validate the password against.
status
The last authentication status.
| since |
1.1.0 |
|---|
Type(s)
int
dbOptions
Database connection options
| since |
1.1.0 |
|---|
Type(s)
array<string|int, mixed>