Migration to last.fm, removed old spotify api client. FOSRestBundle API serving data driven front end (JWT).

This commit is contained in:
boris committed 2026-02-27 16:52:57 +00:00
1 parent 391ecf1732
commit 56dea097d6
51 files changed
+1749 -844

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
fos_rest:
format_listener:
rules:
- { path: ^/api, prefer_extension: false, fallback_format: json, priorities: [json] }
- { path: ^/, prefer_extension: false, fallback_format: html, priorities: [html, '*/*'] }
body_listener: true
view:
view_response_listener: force
formats:
json: true
@@ -0,0 +1,5 @@
lexik_jwt_authentication:
secret_key: '%kernel.project_dir%/config/jwt/private.pem'
public_key: '%kernel.project_dir%/config/jwt/public.pem'
pass_phrase: '%env(JWT_PASSPHRASE)%'
token_ttl: 3600
+20
View File
@@ -15,6 +15,21 @@ security:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
api_login:
pattern: ^/api/v1/auth/login$
stateless: true
provider: app_user_provider
json_login:
check_path: /api/v1/auth/login
username_path: email
password_path: password
success_handler: lexik_jwt_authentication.handler.authentication_success
failure_handler: lexik_jwt_authentication.handler.authentication_failure
api:
pattern: ^/api
stateless: true
provider: app_user_provider
jwt: ~
main:
lazy: true
provider: app_user_provider
@@ -48,6 +63,11 @@ security:
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
access_control:
- { path: ^/api/v1/auth/login$, roles: PUBLIC_ACCESS }
- { path: ^/api/v1/reviews$, roles: ROLE_USER, methods: [POST] }
- { path: ^/api/v1/reviews/[0-9]+$, roles: ROLE_USER, methods: [PUT, PATCH, DELETE] }
- { path: ^/api/v1/albums/ingest$, roles: ROLE_USER, methods: [POST] }
- { path: ^/api, roles: PUBLIC_ACCESS }
- { path: ^/admin/settings, roles: ROLE_ADMIN }
- { path: ^/admin/users, roles: ROLE_MODERATOR }
- { path: ^/admin/dashboard, roles: ROLE_MODERATOR }