PHP 클래스 Airship\Engine\Security\AirBrake

Progressive rate-limiting
파일 보기 프로젝트 열기: paragonie/airship

보호된 프로퍼티들

프로퍼티 타입 설명
$config array
$db Database

공개 메소드들

메소드 설명
__construct ( Database $db = null, array $config = [] ) AirBrake constructor.
failFast ( string $username, string $ip, string $action = self::ACTION_LOGIN ) : boolean Returns true if we must fail fast and return an error message.
getAccountRecoveryAttempts ( string $username, string $ip ) : integer Get the number of recent account recovery attempts
getCutoff ( integer $expire ) : DateInterval Convert a number of seconds into the appropriate DateInterval
getDelay ( string $username, string $ip, string $action = self::ACTION_LOGIN ) : integer Get the throttling delay (in milliseconds)
getFailedLoginAttempts ( string $username, string $ip ) : integer Get the number of recent failed login attempts
getFastExit ( ) : boolean
getIPv4Subnet ( string $ip, integer $maskBits = 32 ) : string Return the given subnet for an IPv4 address and mask bits
getIPv6Subnet ( string $ip, integer $maskBits = 48 ) : string Return the given subnet for an IPv6 address and mask bits
getLogPublicKey ( string $publicKey = '' ) : EncryptionPublicKey Get the EncryptionPublicKey used for encrypting password guesses to give admins insight into the type of attack being launched.
getSubnet ( string $ip ) : string Return the given subnet for an IP and the configured mask bits
registerAccountRecoveryAttempt ( string $username, string $ip ) : boolean Register account recovery attempt
registerLoginFailure ( string $username, string $ip, integer $numFailures, HiddenString $password = null ) : boolean Register a failed login attempt

메소드 상세

__construct() 공개 메소드

AirBrake constructor.
public __construct ( Database $db = null, array $config = [] )
$db Database
$config array

failFast() 공개 메소드

Returns true if we must fail fast and return an error message.
public failFast ( string $username, string $ip, string $action = self::ACTION_LOGIN ) : boolean
$username string
$ip string
$action string
리턴 boolean

getAccountRecoveryAttempts() 공개 메소드

Get the number of recent account recovery attempts
public getAccountRecoveryAttempts ( string $username, string $ip ) : integer
$username string
$ip string
리턴 integer

getCutoff() 공개 메소드

Convert a number of seconds into the appropriate DateInterval
public getCutoff ( integer $expire ) : DateInterval
$expire integer
리턴 DateInterval

getDelay() 공개 메소드

Get the throttling delay (in milliseconds)
public getDelay ( string $username, string $ip, string $action = self::ACTION_LOGIN ) : integer
$username string
$ip string
$action string
리턴 integer

getFailedLoginAttempts() 공개 메소드

Get the number of recent failed login attempts
public getFailedLoginAttempts ( string $username, string $ip ) : integer
$username string
$ip string
리턴 integer

getFastExit() 공개 메소드

public getFastExit ( ) : boolean
리턴 boolean

getIPv4Subnet() 공개 메소드

Return the given subnet for an IPv4 address and mask bits
public getIPv4Subnet ( string $ip, integer $maskBits = 32 ) : string
$ip string
$maskBits integer
리턴 string

getIPv6Subnet() 공개 메소드

Return the given subnet for an IPv6 address and mask bits
public getIPv6Subnet ( string $ip, integer $maskBits = 48 ) : string
$ip string
$maskBits integer
리턴 string

getLogPublicKey() 공개 메소드

Get the EncryptionPublicKey used for encrypting password guesses to give admins insight into the type of attack being launched.
public getLogPublicKey ( string $publicKey = '' ) : EncryptionPublicKey
$publicKey string Hex-encoded public key
리턴 EncryptionPublicKey

getSubnet() 공개 메소드

Determine if the IP is an IPv4 or IPv6 address, then pass to the correct method for handling that specific type.
public getSubnet ( string $ip ) : string
$ip string
리턴 string

registerAccountRecoveryAttempt() 공개 메소드

Register account recovery attempt
public registerAccountRecoveryAttempt ( string $username, string $ip ) : boolean
$username string
$ip string
리턴 boolean

registerLoginFailure() 공개 메소드

Register a failed login attempt
public registerLoginFailure ( string $username, string $ip, integer $numFailures, HiddenString $password = null ) : boolean
$username string
$ip string
$numFailures integer
$password HiddenString
리턴 boolean

프로퍼티 상세

$config 보호되어 있는 프로퍼티

protected array $config
리턴 array

$db 보호되어 있는 프로퍼티

protected Database $db
리턴 Database