View ApiRateLimiter.php
<?php | |
namespace common\components\rateLimiter; | |
use Yii; | |
use yii\base\BaseObject; | |
use yii\filters\RateLimitInterface; | |
/** | |
* API rate limiter. |
View AesCipher.java
import android.support.annotation.Nullable; | |
import android.util.Base64; | |
import java.nio.ByteBuffer; | |
import java.security.SecureRandom; | |
import javax.crypto.Cipher; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; |
View common config main.php
<?php | |
return [ | |
'aliases' => [ | |
'@bower' => '@vendor/bower-asset', | |
'@npm' => '@vendor/npm-asset', | |
], | |
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', | |
'components' => [ | |
'cache' => [ | |
'class' => 'yii\caching\FileCache', |
View AuthRateLimiter.php
<?php | |
namespace common\components\rateLimiter; | |
use Yii; | |
use yii\base\BaseObject; | |
use yii\filters\RateLimitInterface; | |
/** | |
* Auth rate limiter |