Commit 02547a82 by Lech Sawon

jwt installed nad configured

parent a4c41b3f
lexik_jwt_authentication: lexik_jwt_authentication:
secret_key: '%env(resolve:JWT_SECRET_KEY)%' secret_key: '%kernel.project_dir%/config/jwt/private.pem'
public_key: '%env(resolve:JWT_PUBLIC_KEY)%' public_key: '%kernel.project_dir%/config/jwt/public.pem'
pass_phrase: '%env(JWT_PASSPHRASE)%' pass_phrase: '%env(JWT_PASSPHRASE)%'
token_ttl: 3600 # in seconds, default is 3600
...@@ -11,19 +11,6 @@ security: ...@@ -11,19 +11,6 @@ security:
class: App\Entity\User class: App\Entity\User
property: email property: email
firewalls: firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
anonymous: lazy
provider: app_user_provider
guard:
authenticators:
- App\Security\AppLoginFormAuthenticator
logout:
path: app_logout
# where to redirect after logout
# target: app_any_route
login: login:
pattern: ^/api/login pattern: ^/api/login
stateless: true stateless: true
...@@ -31,12 +18,26 @@ security: ...@@ -31,12 +18,26 @@ security:
check_path: /api/login_check # or api_login_check as defined in config/routes.yaml check_path: /api/login_check # or api_login_check as defined in config/routes.yaml
success_handler: lexik_jwt_authentication.handler.authentication_success success_handler: lexik_jwt_authentication.handler.authentication_success
failure_handler: lexik_jwt_authentication.handler.authentication_failure failure_handler: lexik_jwt_authentication.handler.authentication_failure
api: api:
pattern: ^/api pattern: ^/api
stateless: true stateless: true
guard: guard:
authenticators: authenticators:
- lexik_jwt_authentication.jwt_token_authenticator - lexik_jwt_authentication.jwt_token_authenticator
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
anonymous: lazy
provider: app_user_provider
guard:
authenticators:
- App\Security\AppLoginFormAuthenticator
logout:
path: app_logout
# where to redirect after logout
# target: app_any_route
# activate different ways to authenticate # activate different ways to authenticate
# https://symfony.com/doc/current/security.html#firewalls-authentication # https://symfony.com/doc/current/security.html#firewalls-authentication
......
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
# controller: App\Controller\DefaultController::index # controller: App\Controller\DefaultController::index
api_login_check: api_login_check:
path: /api/login_check path: /api/login_check
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment