FRED™
3.0
FRED™: Framework for Rapid and Easy Development
Subnet.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Rsi\Fred\User\Authenticator
;
4
5
class
Subnet
extends
\Rsi\Fred\User\Authenticator{
6
7
public
$subnets
= [];
//!< Allowed subnets (CIDR notation).
8
9
protected
function
init
(){
10
parent::init();
11
$this->
invalidate
();
//re-check every time
12
}
13
14
public
function
check
(){
15
return \Rsi\Http::inSubnet($this->subnets,$this->
component
(
'security'
)->remoteAddr);
16
}
17
18
}
Rsi\Fred\User\Authenticator\Subnet
Definition:
Subnet.php:5
Rsi\Fred\User\Authenticator\Subnet\init
init()
Definition:
Subnet.php:9
Rsi\Fred\User\Authenticator\Subnet\$subnets
$subnets
Allowed subnets (CIDR notation).
Definition:
Subnet.php:7
Rsi\Fred\User\Authenticator\Subnet\check
check()
Definition:
Subnet.php:14
Rsi\Fred\User\Authenticator
Definition:
GeoIp.php:3
Rsi\Fred\User\Authenticator\invalidate
invalidate()
Definition:
Authenticator.php:41
Rsi\Fred\Component\component
component($name)
Get a component (local or default).
Definition:
Component.php:80
src
Rsi
Fred
User
Authenticator
Subnet.php
Generated on Sun Aug 2 2020 19:43:58 for FRED™ by
1.8.13