提交 a19edf57 编写于 作者: T teebbstudios

82. login_throtting

上级 08ecd4ba
......@@ -26,3 +26,9 @@ APP_SECRET=f29e104c2042ee548893fe7a0d0a7106
DATABASE_URL="mysql://root:password@127.0.0.1:8888/teebblog?serverVersion=5.7"
# DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=13&charset=utf8"
###< doctrine/doctrine-bundle ###
###> symfony/lock ###
# Choose one of the stores below
# postgresql+advisory://db_user:db_password@localhost/db_name
LOCK_DSN=semaphore
###< symfony/lock ###
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "7cb9422b836ebd01c3e1561b51ca38ea",
"content-hash": "366b55e9b63d5e2f0c27659b76ae7128",
"packages": [
{
"name": "composer/package-versions-deprecated",
......@@ -4593,6 +4593,92 @@
],
"time": "2021-05-27T12:28:50+00:00"
},
{
"name": "symfony/lock",
"version": "v5.3.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/lock.git",
"reference": "1f166823d4307eecd9f964804afefa2a59b9a3cf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/lock/zipball/1f166823d4307eecd9f964804afefa2a59b9a3cf",
"reference": "1f166823d4307eecd9f964804afefa2a59b9a3cf",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.2.5",
"psr/log": "~1.0",
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-php80": "^1.15"
},
"conflict": {
"doctrine/dbal": "<2.10"
},
"require-dev": {
"doctrine/dbal": "^2.10|^3.0",
"mongodb/mongodb": "~1.1",
"predis/predis": "~1.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Lock\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jérémy Derussé",
"email": "jeremy@derusse.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Creates and manages locks, a mechanism to provide exclusive access to a shared resource",
"homepage": "https://symfony.com",
"keywords": [
"cas",
"flock",
"locking",
"mutex",
"redlock",
"semaphore"
],
"support": {
"source": "https://github.com/symfony/lock/tree/v5.3.2"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-06-06T09:51:56+00:00"
},
{
"name": "symfony/mime",
"version": "v5.3.2",
......@@ -5953,6 +6039,82 @@
],
"time": "2021-05-26T12:52:38+00:00"
},
{
"name": "symfony/rate-limiter",
"version": "v5.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/rate-limiter.git",
"reference": "e9226c91163495ff0b655cdae0fff682e869640b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/rate-limiter/zipball/e9226c91163495ff0b655cdae0fff682e869640b",
"reference": "e9226c91163495ff0b655cdae0fff682e869640b",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.2.5",
"symfony/lock": "^5.2",
"symfony/options-resolver": "^5.1"
},
"require-dev": {
"psr/cache": "^1.0|^2.0|^3.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\RateLimiter\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Wouter de Jong",
"email": "wouter@wouterj.nl"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides a Token Bucket implementation to rate limit input and output in your application",
"homepage": "https://symfony.com",
"keywords": [
"limiter",
"rate-limiter"
],
"support": {
"source": "https://github.com/symfony/rate-limiter/tree/v5.3.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-05-26T17:43:10+00:00"
},
{
"name": "symfony/routing",
"version": "v5.3.0",
......
framework:
lock: '%env(LOCK_DSN)%'
......@@ -24,6 +24,8 @@ security:
secret: '%kernel.secret%'
lifetime: 604800 # 1 week in seconds
path: /
login_throttling:
max_attempts: 3
logout:
path: app_logout
# where to redirect after logout
......
......@@ -407,6 +407,18 @@
"symfony/intl": {
"version": "v5.3.0"
},
"symfony/lock": {
"version": "5.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.2",
"ref": "a1c8800e40ae735206bb14586fdd6c4630a51b8d"
},
"files": [
"config/packages/lock.yaml"
]
},
"symfony/maker-bundle": {
"version": "1.0",
"recipe": {
......@@ -512,6 +524,9 @@
"symfony/proxy-manager-bridge": {
"version": "v5.3.0"
},
"symfony/rate-limiter": {
"version": "v5.3.0"
},
"symfony/routing": {
"version": "5.3",
"recipe": {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册