File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ class AuthManagerAdapter(AuthBase):
5454
5555 This adapter is useful when working with `requests.Session.auth`
5656 and allows reuse of authentication strategies defined by `AuthManager`.
57+ This AuthManagerAdapter is only intended to be used against the REST Catalog
58+ Server that expects the Authorization Header.
5759 """
5860
5961 def __init__ (self , auth_manager : AuthManager ):
@@ -65,7 +67,7 @@ def __init__(self, auth_manager: AuthManager):
6567 """
6668 self .auth_manager = auth_manager
6769
68- def __call__ (self , r : PreparedRequest ) -> PreparedRequest :
70+ def __call__ (self , request : PreparedRequest ) -> PreparedRequest :
6971 """
7072 Modify the outgoing request to include the Authorization header.
7173
@@ -75,7 +77,6 @@ def __call__(self, r: PreparedRequest) -> PreparedRequest:
7577 Returns:
7678 requests.PreparedRequest: The modified request with Authorization header.
7779 """
78- auth_header = self .auth_manager .auth_header ()
79- if auth_header :
80- r .headers ["Authorization" ] = auth_header
81- return r
80+ if auth_header := self .auth_manager .auth_header ():
81+ request .headers ["Authorization" ] = auth_header
82+ return request
You can’t perform that action at this time.
0 commit comments