Enhancement: support remote user auth directly against API (DRF) (#5386)

This commit is contained in:
shamoon 2024-01-16 15:26:05 -08:00 committed by GitHub
parent 2e2362e2df
commit 6db9e292ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 112 additions and 11 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