How to Custom yiisoft base Security.php on single file

I want to make base Security with Yii::$app->getSecurity() to permission access in my API functions

Would you please elaborate?

I want to use Yii::$app->getSecurity() function on different platforms as in native php to interact via the API in Yii2

Still don’t get it…

okay, sorry my english is bad, first i create Controller with Parameter $data with encrypted use function Yii::$app->getSecurity() and i want use this for another platforms as in native php which include this Serurity.php for Class.

You mean you want to use Security component of Yii in non-Yii application?

i still dont get it too, if u want send data to non-Yii application u can use web service with json or store your data in temporary database and your non yii app get it from there

yes that is

If the other application is PHP, you could modify the Security class to use it in a non-Yii environment. It is largely independent of the rest of Yii.