mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: add registration
This commit is contained in:
@@ -18,4 +18,5 @@ return [
|
||||
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
|
||||
KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle::class => ['all' => true],
|
||||
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
|
||||
SymfonyCasts\Bundle\VerifyEmail\SymfonyCastsVerifyEmailBundle::class => ['all' => true],
|
||||
];
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
framework:
|
||||
rate_limiter:
|
||||
# define 2 rate limiters (one for username+IP, the other for IP)
|
||||
username_ip_login:
|
||||
policy: token_bucket
|
||||
limit: 5
|
||||
@@ -11,8 +10,17 @@ framework:
|
||||
limit: 50
|
||||
interval: '15 minutes'
|
||||
|
||||
user_register:
|
||||
policy: token_bucket
|
||||
limit: 1
|
||||
rate: { interval: '5 minutes' }
|
||||
|
||||
rdap_requests:
|
||||
policy: sliding_window
|
||||
limit: 10
|
||||
interval: '1 hour'
|
||||
|
||||
services:
|
||||
# our custom login rate limiter
|
||||
app.login_rate_limiter:
|
||||
class: Symfony\Component\Security\Http\RateLimiter\DefaultLoginRateLimiter
|
||||
arguments:
|
||||
@@ -69,6 +77,7 @@ security:
|
||||
access_control:
|
||||
- { path: ^/api$, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/api/docs, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/api/register$, roles: PUBLIC_ACCESS }
|
||||
- { path: "^/api/watchlists/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/calendar$", roles: PUBLIC_ACCESS }
|
||||
- { path: "^/api/config$", roles: PUBLIC_ACCESS }
|
||||
- { path: ^/api, roles: IS_AUTHENTICATED_FULLY }
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
|
||||
parameters:
|
||||
mailer_sender_email: '%env(string:MAILER_SENDER_EMAIL)%'
|
||||
mailer_sender_name: '%env(string:MAILER_SENDER_NAME)'
|
||||
oauth_enabled: '%env(OAUTH_CLIENT_ID)%'
|
||||
limited_features: '%env(bool:LIMITED_FEATURES)%'
|
||||
registration_enabled: '%env(bool:REGISTRATION_ENABLED)%'
|
||||
|
||||
services:
|
||||
# default configuration for services in *this* file
|
||||
@@ -15,6 +17,7 @@ services:
|
||||
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
|
||||
bind:
|
||||
$mailerSenderEmail: '%mailer_sender_email%'
|
||||
$mailerSenderName: '%mailer_sender_name%'
|
||||
|
||||
# makes classes in src/ available to be used as services
|
||||
# this creates a service per class whose id is the fully-qualified class name
|
||||
|
||||
Reference in New Issue
Block a user