Свойство | Тип | Описание | |
---|---|---|---|
$adapter | mixed | Auth adapter object | |
$attempts | integer | Current number of login attempts | |
$encryption | integer | Encryption method to use | |
$encryptionOptions | array | 'salt' // Custom Salt 'secret' // Secret pepper 'cost' // Bcrypt cost 'prefix' // Bcrypt prefix 'rounds' // Sha rounds 'cipher' // Mcrypt cipher 'mode' // Mcrypt cipher 'source' // Mcrypt source | |
$ip | string | Current IP address | |
$isValid | boolean | User validation result from authentication | |
$result | integer | Authentication result | |
$subnet | array | Current subnet | |
$validators | array | Array of validator objects |
Метод | Описание | |
---|---|---|
__construct ( Pop\Auth\Adapter\AdapterInterface $adapter, integer $encryption, array $options = [] ) : |
Constructor | |
authenticate ( string $username, string $password ) : integer | Method to authenticate a user | |
factory ( Pop\Auth\Adapter\AdapterInterface $adapter, integer $encryption ) : |
Static method to instantiate the auth object and return itself to facilitate chaining methods together. | |
getAttempts ( ) : integer | Method to get the current number of login attempts | |
getEncryption ( ) : integer | Method to get the encryption | |
getEncryptionOptions ( ) : array | Method to get the encryption options | |
getResult ( ) : integer | Method to get the authentication result | |
getResultMessage ( ) : string | Method to get the authentication result message | |
getUser ( ) : array | Method to get the user data array from the adapter | |
getValidator ( string $name ) : mixed | Method to get a validator | |
isValid ( ) : boolean | Method to determine if the user is valid | |
setAllowedIps ( string | array $ips = null ) : |
Method to set the allowed IP addresses | |
setAllowedSubnets ( string | array $subnets = null ) : |
Method to set the allowed subnets | |
setAttemptLimit ( integer $attempts ) : |
Method to set the number of attempts allowed | |
setAttempts ( integer $attempts ) : |
Method to set the number of attempts allowed | |
setBlockedIps ( string | array $ips = null ) : |
Method to set the block IP addresses | |
setBlockedSubnets ( string | array $subnets = null ) : |
Method to set the block subnets | |
setEncryption ( integer $encryption ) : |
Method to set the encryption | |
setEncryptionOptions ( array $options = [] ) : |
Method to set the encryption options |
Метод | Описание | |
---|---|---|
filterIps ( string | array $ips ) : array | Method to filter the ip addresses to confirm their validity | |
filterSubnets ( string | array $subnets ) : array | Method to filter the subnets to confirm their validity | |
processValidators ( ) : void | Method to process the validators |
public __construct ( Pop\Auth\Adapter\AdapterInterface $adapter, integer $encryption, array $options = [] ) : |
||
$adapter | Pop\Auth\Adapter\AdapterInterface | |
$encryption | integer | |
$options | array | |
Результат |
public getAttempts ( ) : integer | ||
Результат | integer |
public getEncryption ( ) : integer | ||
Результат | integer |
public getEncryptionOptions ( ) : array | ||
Результат | array |
public getResultMessage ( ) : string | ||
Результат | string |
public getValidator ( string $name ) : mixed | ||
$name | string | |
Результат | mixed |
protected processValidators ( ) : void | ||
Результат | void |
public setAllowedIps ( string | array $ips = null ) : |
||
$ips | string | array | |
Результат |
public setAllowedSubnets ( string | array $subnets = null ) : |
||
$subnets | string | array | |
Результат |
public setAttemptLimit ( integer $attempts ) : |
||
$attempts | integer | |
Результат |
public setAttempts ( integer $attempts ) : |
||
$attempts | integer | |
Результат |
public setBlockedIps ( string | array $ips = null ) : |
||
$ips | string | array | |
Результат |
public setBlockedSubnets ( string | array $subnets = null ) : |
||
$subnets | string | array | |
Результат |
public setEncryption ( integer $encryption ) : |
||
$encryption | integer | |
Результат |
public setEncryptionOptions ( array $options = [] ) : |
||
$options | array | |
Результат |
protected int $attempts | ||
Результат | integer |
protected int $encryption | ||
Результат | integer |
protected array $encryptionOptions | ||
Результат | array |
protected bool $isValid | ||
Результат | boolean |
protected array $validators | ||
Результат | array |