Skip to content

Commit

Permalink
Add an authenticate_header method
Browse files Browse the repository at this point in the history
Closes #5819
  • Loading branch information
decko committed Sep 20, 2024
1 parent a41f396 commit 5c17943
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/5819.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add an `authentication_header` method to make JSONHeaderRemoteAuthentication return proper 401 when the request is not properly authenticated.
3 changes: 3 additions & 0 deletions pulpcore/app/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ def authenticate(self, request):

_logger.debug(_("User {user} authenticated.").format(user=remote_user))
return (user, None)

def authenticate_header(self, request):
return "JSONHeaderRemoteAuthentication"

0 comments on commit 5c17943

Please sign in to comment.