Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
| <?php | |
| # tests/bootstrap.php | |
| declare(strict_types=1); | |
| namespace App\Test; | |
| use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client; | |
| use App\Entity\User; | |
| use App\Kernel; | 
| # Install K3S | |
| curl -sfL https://get.k3s.io | sh - | |
| # Copy k3s config | |
| mkdir $HOME/.kube | |
| sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config | |
| sudo chmod 644 $HOME/.kube/config | |
| # Check K3S | |
| kubectl get pods -n kube-system | 
| <?php | |
| declare(strict_types = 1); | |
| namespace Acme\Infrastructure\MongoDb; | |
| use MongoDB\Client; | |
| use MongoDB\Collection; | |
| class MongoConnection | 
| /* | |
| Stores entries in a local SQLite database | |
| until they have been processed by a submit function. | |
| */ | |
| package journal | |
| import ( | |
| "database/sql" | |
| _ "github.com/mattn/go-sqlite3" | |
| "sync" | 
| <?php | |
| namespace App\Controller\Website; | |
| use Sulu\Bundle\WebsiteBundle\Controller\WebsiteController; | |
| use Sulu\Component\Content\Compat\StructureInterface; | |
| /** | |
| * Controller which needs a custom service to add data to render twig template. | |
| */ | 
| id, field1, field2, field3 | |
| {% for row in data %} | |
| {{ row.id }},{{ row.field1 }},{{ row.field2 }},{{ row.field3 }} | |
| {% endfor %} | 
| <?php | |
| namespace Your\Bundle\Misc; | |
| class SluggableListener extends \Gedmo\Sluggable\SluggableListener | |
| { | |
| public function __construct(){ | |
| $this->setTransliterator(array('\Your\Bundle\Misc\Transliterator', 'transliterate')); | |
| } | 
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.