Merge branch 'develop' of https://github.com/wh1te909/tacticalrmm into develop

This commit is contained in:
wh1te909 2022-03-17 19:54:58 +00:00
commit d91d372fc5
1 changed files with 6 additions and 5 deletions

View File

@ -3,10 +3,11 @@ from drf_spectacular.extensions import OpenApiAuthenticationExtension
# custom api key auth for swagger-ui
class APIAuthenticationScheme(OpenApiAuthenticationExtension):
target_class = "tacticalrmm.auth.APIAuthentication" # full import path OR class ref
name = 'API Key Auth' # name used in the schem
name = "API Key Auth" # name used in the schem
def get_security_definition(self, auto_schema):
return {
'type': 'apiKey',
'in': 'header',
'name': 'X-API-KEY',
}
"type": "apiKey",
"in": "header",
"name": "X-API-KEY",
}