Enhancement: re-implement remote user auth for API as opt-in (#5561)

This commit is contained in:
shamoon
2024-02-01 11:46:26 -08:00
committed by GitHub
parent 38a817e887
commit 61209b1057
5 changed files with 163 additions and 12 deletions

View File

@@ -47,3 +47,11 @@ class HttpRemoteUserMiddleware(PersistentRemoteUserMiddleware):
"""
header = settings.HTTP_REMOTE_USER_HEADER_NAME
class PaperlessRemoteUserAuthentication(authentication.RemoteUserAuthentication):
"""
REMOTE_USER authentication for DRF which overrides the default header.
"""
header = settings.HTTP_REMOTE_USER_HEADER_NAME