‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Authentication\IpLocker Class Reference

Public Member Functions

 __construct (int $lockIPv4PartCount, int $lockIPv6PartCount)
 
 getSessionIpLock (string $ipAddress)
 
 validateRemoteAddressAgainstSessionIpLock (string $ipAddress, string $sessionIpLock)
 

Public Attributes

const DISABLED_LOCK_VALUE = '[DISABLED]'
 

Protected Member Functions

 getIpLockPart (string $ipAddress, int $numberOfParts, int $maxParts, string $delimiter)
 
 getIpLockPartForIpv4Address (string $ipAddress)
 
 getIpLockPartForIpv6Address (string $ipAddress)
 
 isIpv6Address (string $ipAddress)
 

Protected Attributes

int $lockIPv4PartCount = 4
 
int $lockIPv6PartCount = 8
 

Detailed Description

Handles the locking of sessions to IP addresses.

Definition at line 25 of file IpLocker.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Authentication\IpLocker::__construct ( int  $lockIPv4PartCount,
int  $lockIPv6PartCount 
)

Member Function Documentation

◆ getIpLockPart()

TYPO3\CMS\Core\Authentication\IpLocker::getIpLockPart ( string  $ipAddress,
int  $numberOfParts,
int  $maxParts,
string  $delimiter 
)
protected

◆ getIpLockPartForIpv4Address()

TYPO3\CMS\Core\Authentication\IpLocker::getIpLockPartForIpv4Address ( string  $ipAddress)
protected

◆ getIpLockPartForIpv6Address()

TYPO3\CMS\Core\Authentication\IpLocker::getIpLockPartForIpv6Address ( string  $ipAddress)
protected

◆ getSessionIpLock()

◆ isIpv6Address()

TYPO3\CMS\Core\Authentication\IpLocker::isIpv6Address ( string  $ipAddress)
protected

◆ validateRemoteAddressAgainstSessionIpLock()

TYPO3\CMS\Core\Authentication\IpLocker::validateRemoteAddressAgainstSessionIpLock ( string  $ipAddress,
string  $sessionIpLock 
)

Member Data Documentation

◆ $lockIPv4PartCount

int TYPO3\CMS\Core\Authentication\IpLocker::$lockIPv4PartCount = 4
protected

If set to 4, the session will be locked to the user's IP address (all four numbers). Reducing this to 1-3 means that only the given number of parts of the IP address is used.

Definition at line 34 of file IpLocker.php.

Referenced by TYPO3\CMS\Core\Authentication\IpLocker\__construct().

◆ $lockIPv6PartCount

int TYPO3\CMS\Core\Authentication\IpLocker::$lockIPv6PartCount = 8
protected

Same setting as lockIP but for IPv6 addresses.

Definition at line 40 of file IpLocker.php.

Referenced by TYPO3\CMS\Core\Authentication\IpLocker\__construct().

◆ DISABLED_LOCK_VALUE

const TYPO3\CMS\Core\Authentication\IpLocker::DISABLED_LOCK_VALUE = '[DISABLED]'