Added possibility to authenticate with the given API token

This commit is contained in:
Jan Böhmer 2023-08-16 00:13:01 +02:00
parent 3bc6e61869
commit bcd41c4d9b
5 changed files with 125 additions and 3 deletions

View file

@ -3,4 +3,11 @@ api_platform:
title: 'Part-DB API'
description: 'API of Part-DB'
version: '0.1.0'
version: '0.1.0'
swagger:
api_keys:
# overridden in OpenApiFactoryDecorator
access_token:
name: Authorization
type: header

View file

@ -21,6 +21,9 @@ security:
user_checker: App\Security\UserChecker
entry_point: form_login
access_token:
token_handler: App\Security\ApiTokenHandler
# Enable user impersonation
switch_user: { role: CAN_SWITCH_USER }