mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Return a 401 message with an JSON encoded body, if no authentication header is passed for an API request.
Also for browser requests, a flash message is shown in that case, prompting the user to authenticate. This follows a suggestion from issue #494
This commit is contained in:
parent
631c364179
commit
f0519ae0b3
3 changed files with 1512 additions and 1430 deletions
|
@ -19,7 +19,7 @@ security:
|
|||
provider: app_user_provider
|
||||
lazy: true
|
||||
user_checker: App\Security\UserChecker
|
||||
entry_point: form_login
|
||||
entry_point: App\Security\AuthenticationEntryPoint
|
||||
|
||||
# Enable user impersonation
|
||||
switch_user: { role: CAN_SWITCH_USER }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue