Skip to content

Commit

Permalink
Rename AWSV4Signer.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Oct 23, 2023
1 parent 8d5aeb0 commit ee4517d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions opensearchpy/helpers/signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def fetch_url(prepared_request): # type: ignore
return url.scheme + "://" + location + path + querystring


class AuthSigner:
class AWSV4Signer:
"""
Generic AWS V4 Request Signer.
"""
Expand Down Expand Up @@ -107,7 +107,7 @@ class RequestsAWSV4SignerAuth(requests.auth.AuthBase):
"""

def __init__(self, credentials, region, service="es"): # type: ignore
self.signer = AuthSigner(credentials, region, service)
self.signer = AWSV4Signer(credentials, region, service)

def __call__(self, request): # type: ignore
return self._sign_request(request) # type: ignore
Expand Down Expand Up @@ -137,7 +137,7 @@ class AWSV4SignerAuth(RequestsAWSV4SignerAuth):

class Urllib3AWSV4SignerAuth(Callable): # type: ignore
def __init__(self, credentials, region, service="es"): # type: ignore
self.signer = AuthSigner(credentials, region, service)
self.signer = AWSV4Signer(credentials, region, service)

def __call__(self, method: str, url: str, body: Any) -> Dict[str, str]:
return self.signer.sign(method, url, body)

0 comments on commit ee4517d

Please sign in to comment.