Skip to content

Commit

Permalink
Merge pull request #2 from Dean151/authentication
Browse files Browse the repository at this point in the history
Authentication
  • Loading branch information
Dean151 authored Jul 28, 2022
2 parents be6da09 + 98a16aa commit f25a73a
Show file tree
Hide file tree
Showing 59 changed files with 3,944 additions and 301 deletions.
16 changes: 16 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ DATABASE_NAME=main
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
###< nelmio/cors-bundle ###

AUTHENTICATION_ENABLED=false

EMAIL_SENDER=[email protected]

FEEDER_RESPONSE_TIMEOUT=5.0

RABBITMQ_HOST=127.0.0.1
Expand All @@ -45,6 +49,18 @@ RABBITMQ_PASSWORD=guest
SIMULATOR_HOST=127.0.0.1
SIMULATOR_PORT=9999

SITE_BASE_URL=https://example.com
SITE_NAME='Cat Feeder'

WEBSOCKET_HOST=0.0.0.0
WEBSOCKET_PORT=9999

###> lexik/jwt-authentication-bundle ###
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
JWT_PASSPHRASE=fb5d893ea421b457f7c608807d5a5434
###< lexik/jwt-authentication-bundle ###

###> symfony/mailer ###
MAILER_DSN=null://null
###< symfony/mailer ###
4 changes: 4 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots

AUTHENTICATION_ENABLED=false

EMAIL_SENDER=[email protected]

FEEDER_RESPONSE_TIMEOUT=1.0

SIMULATOR_PORT=9998
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@
.phpunit.result.cache
###< phpunit/phpunit ###
.idea

###> lexik/jwt-authentication-bundle ###
/config/jwt/*.pem
###< lexik/jwt-authentication-bundle ###
9 changes: 9 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"doctrine/doctrine-bundle": "^2.7",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.12",
"lexik/jwt-authentication-bundle": "^2.16",
"nelmio/cors-bundle": "^2.2",
"php-amqplib/php-amqplib": "^3.2",
"phpdocumentor/reflection-docblock": "^5.3",
Expand All @@ -27,13 +28,18 @@
"symfony/expression-language": "^6.1.0",
"symfony/flex": "^2",
"symfony/framework-bundle": "^6.1.0",
"symfony/mailer": "^6.1.0",
"symfony/property-access": "^6.1.0",
"symfony/property-info": "^6.1.0",
"symfony/proxy-manager-bridge": "^6.1.0",
"symfony/runtime": "^6.1.0",
"symfony/security-bundle": "^6.1.0",
"symfony/serializer": "^6.1.0",
"symfony/translation": "^6.1.0",
"symfony/uid": "^6.1.0",
"symfony/validator": "^6.1.0",
"symfony/yaml": "^6.1.0",
"symfonycasts/reset-password-bundle": "^1.14",
"thecodingmachine/safe": "^2.2"
},
"require-dev": {
Expand All @@ -56,6 +62,7 @@
"symfony/stopwatch": "^6.1.0",
"symfony/web-profiler-bundle": "^6.1.0",
"thecodingmachine/phpstan-safe-rule": "^1.2",
"zalas/phpunit-globals": "^2.2",
"zenstruck/foundry": "^1.21"
},
"config": {
Expand Down Expand Up @@ -92,6 +99,7 @@
"scripts": {
"boot": [
"docker-compose up -d",
"symfony console lexik:jwt:check-config || lexik:jwt:generate-keypair",
"@start"
],
"start": [
Expand Down Expand Up @@ -127,6 +135,7 @@
"symfony server:stop"
],
"pre-unit": [
"bin/console lexik:jwt:generate-keypair --skip-if-exists",
"bin/console -e test doctrine:database:create --no-interaction --if-not-exists",
"bin/console -e test doctrine:migration:migrate --no-interaction --all-or-nothing --allow-no-migration",
"bin/console -e test doctrine:fixtures:load --no-interaction"
Expand Down
Loading

0 comments on commit f25a73a

Please sign in to comment.