Property | Type | Description | |
---|---|---|---|
$globalInterval | integer | The interval which failed logins are checked, to prevent brute force. | |
$globalThresholds | integer | array | If an array is set, the key is the number of failed login attempts and the value is the delay in seconds before another login can occur. If an integer is set, it represents the number of attempts before throttling locks out in the current interval. | |
$globalThrottles | Illuminate\Database\Eloquent\Collection | Cached global throttles collection within the interval. | |
$ipInterval | integer | The interval at which point one IP address' failed logins are checked. | |
$ipThresholds | integer | array | Works identical to global thresholds, except specific to an IP address. | |
$ipThrottles | array | The cached IP address throttle collections within the interval. | |
$userInterval | integer | The interval at which point failed logins for one user are checked. | |
$userThresholds | integer | array | Works identical to global and IP address thresholds, regarding a user. | |
$userThrottles | Illuminate\Database\Eloquent\Collection | The cached user throttle collections within the interval. |
Method | Description | |
---|---|---|
__construct ( string $model = 'Cartalyst\Sentinel\Throttling\EloquentThrottle', integer $globalInterval = null, integer | array $globalThresholds = null, integer $ipInterval = null, integer | array $ipThresholds = null, integer $userInterval = null, integer | array $userThresholds = null ) : void | Create a new Illuminate throttle repository. | |
getGlobalInterval ( ) : integer | Returns the global interval. | |
getGlobalThresholds ( ) : integer | array | Returns the global thresholds. | |
getIpInterval ( ) : integer | Returns the IP address interval. | |
getIpThresholds ( ) : integer | array | Returns the IP address thresholds. | |
getUserInterval ( ) : integer | Returns the user interval. | |
getUserThresholds ( ) : integer | array | Returns the user thresholds. | |
globalDelay ( ) | {@inheritDoc} | |
ipDelay ( $ipAddress ) | {@inheritDoc} | |
log ( $ipAddress = null, Cartalyst\Sentinel\Users\UserInterface $user = null ) | {@inheritDoc} | |
setGlobalInterval ( integer $globalInterval ) : void | Sets the global interval. | |
setGlobalThresholds ( integer | array $globalThresholds ) : void | Sets the global thresholds. | |
setIpInterval ( integer $ipInterval ) : void | Sets the IP address interval. | |
setIpThresholds ( integer | array $ipThresholds ) : void | Sets the IP address thresholds. | |
setUserInterval ( integer $userInterval ) : void | Sets the user interval. | |
setUserThresholds ( integer | array $userThresholds ) : void | Sets the user thresholds. | |
userDelay ( Cartalyst\Sentinel\Users\UserInterface $user ) | {@inheritDoc} |
Method | Description | |
---|---|---|
delay ( string $type, mixed $argument = null ) : integer | Returns a delay for the given type. | |
getGlobalThrottles ( ) : Illuminate\Database\Eloquent\Collection | Returns the global throttles collection. | |
getIpThrottles ( string $ipAddress ) : Illuminate\Database\Eloquent\Collection | Returns the IP address throttles collection. | |
getUserThrottles ( Cartalyst\Sentinel\Users\UserInterface $user ) : Illuminate\Database\Eloquent\Collection | Returns the user throttles collection. | |
loadGlobalThrottles ( ) : Illuminate\Database\Eloquent\Collection | Loads and returns the global throttles collection. | |
loadIpThrottles ( string $ipAddress ) : Illuminate\Database\Eloquent\Collection | Loads and returns the IP address throttles collection. | |
loadUserThrottles ( Cartalyst\Sentinel\Users\UserInterface $user ) : Illuminate\Database\Eloquent\Collection | Loads and returns the user throttles collection. | |
secondsToFree ( |
Returns the seconds to free based on the given throttle and the presented delay in seconds, by comparing it to now. |
public __construct ( string $model = 'Cartalyst\Sentinel\Throttling\EloquentThrottle', integer $globalInterval = null, integer | array $globalThresholds = null, integer $ipInterval = null, integer | array $ipThresholds = null, integer $userInterval = null, integer | array $userThresholds = null ) : void | ||
$model | string | |
$globalInterval | integer | |
$globalThresholds | integer | array | |
$ipInterval | integer | |
$ipThresholds | integer | array | |
$userInterval | integer | |
$userThresholds | integer | array | |
return | void |
public getGlobalInterval ( ) : integer | ||
return | integer |
public getGlobalThresholds ( ) : integer | array | ||
return | integer | array |
protected getGlobalThrottles ( ) : Illuminate\Database\Eloquent\Collection | ||
return | Illuminate\Database\Eloquent\Collection |
public getIpInterval ( ) : integer | ||
return | integer |
public getIpThresholds ( ) : integer | array | ||
return | integer | array |
protected getIpThrottles ( string $ipAddress ) : Illuminate\Database\Eloquent\Collection | ||
$ipAddress | string | |
return | Illuminate\Database\Eloquent\Collection |
public getUserInterval ( ) : integer | ||
return | integer |
public getUserThresholds ( ) : integer | array | ||
return | integer | array |
protected getUserThrottles ( Cartalyst\Sentinel\Users\UserInterface $user ) : Illuminate\Database\Eloquent\Collection | ||
$user | Cartalyst\Sentinel\Users\UserInterface | |
return | Illuminate\Database\Eloquent\Collection |
protected loadGlobalThrottles ( ) : Illuminate\Database\Eloquent\Collection | ||
return | Illuminate\Database\Eloquent\Collection |
protected loadIpThrottles ( string $ipAddress ) : Illuminate\Database\Eloquent\Collection | ||
$ipAddress | string | |
return | Illuminate\Database\Eloquent\Collection |
protected loadUserThrottles ( Cartalyst\Sentinel\Users\UserInterface $user ) : Illuminate\Database\Eloquent\Collection | ||
$user | Cartalyst\Sentinel\Users\UserInterface | |
return | Illuminate\Database\Eloquent\Collection |
public log ( $ipAddress = null, Cartalyst\Sentinel\Users\UserInterface $user = null ) | ||
$user | Cartalyst\Sentinel\Users\UserInterface |
protected secondsToFree ( |
||
$throttle | ||
$interval | integer | |
return | integer |
public setGlobalInterval ( integer $globalInterval ) : void | ||
$globalInterval | integer | |
return | void |
public setIpInterval ( integer $ipInterval ) : void | ||
$ipInterval | integer | |
return | void |
public setUserInterval ( integer $userInterval ) : void | ||
$userInterval | integer | |
return | void |
public userDelay ( Cartalyst\Sentinel\Users\UserInterface $user ) | ||
$user | Cartalyst\Sentinel\Users\UserInterface |
protected int $globalInterval | ||
return | integer |
protected Collection,Illuminate\Database\Eloquent $globalThrottles | ||
return | Illuminate\Database\Eloquent\Collection |
protected int $ipInterval | ||
return | integer |
protected array $ipThrottles | ||
return | array |
protected int $userInterval | ||
return | integer |